Add unit test
This commit is contained in:
parent
2797d5ed91
commit
e9346e29ee
2 changed files with 6 additions and 4 deletions
|
@ -250,10 +250,12 @@ fn test_read_metadata() {
|
||||||
duration: Some(0),
|
duration: Some(0),
|
||||||
..sample_tags.clone()
|
..sample_tags.clone()
|
||||||
};
|
};
|
||||||
|
let m4a_sample_tag = SongTags {
|
||||||
|
duration: Some(0),
|
||||||
|
..sample_tags.clone()
|
||||||
|
};
|
||||||
assert_eq!(read(Path::new("test/sample.mp3")).unwrap(), mp3_sample_tag);
|
assert_eq!(read(Path::new("test/sample.mp3")).unwrap(), mp3_sample_tag);
|
||||||
assert_eq!(read(Path::new("test/sample.ogg")).unwrap(), sample_tags);
|
assert_eq!(read(Path::new("test/sample.ogg")).unwrap(), sample_tags);
|
||||||
assert_eq!(
|
assert_eq!(read(Path::new("test/sample.flac")).unwrap(), flac_sample_tag);
|
||||||
read(Path::new("test/sample.flac")).unwrap(),
|
assert_eq!(read(Path::new("test/sample.m4a")).unwrap(), m4a_sample_tag);
|
||||||
flac_sample_tag
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
BIN
test/sample.m4a
Normal file
BIN
test/sample.m4a
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue