Add unit test

This commit is contained in:
Ray 2020-06-15 15:02:48 -04:00
parent 2797d5ed91
commit e9346e29ee
2 changed files with 6 additions and 4 deletions

View file

@ -250,10 +250,12 @@ fn test_read_metadata() {
duration: Some(0),
..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.ogg")).unwrap(), sample_tags);
assert_eq!(
read(Path::new("test/sample.flac")).unwrap(),
flac_sample_tag
);
assert_eq!(read(Path::new("test/sample.flac")).unwrap(), flac_sample_tag);
assert_eq!(read(Path::new("test/sample.m4a")).unwrap(), m4a_sample_tag);
}

BIN
test/sample.m4a Normal file

Binary file not shown.