Skip to content

Commit 3c20834

Browse files
committed
Tests/TagLib: Do not check bit depth for lossy formats
1 parent 94efe29 commit 3c20834

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lofty/tests/taglib/test_mp4.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ fn test_properties_aac() {
1818
assert_eq!(f.properties().audio_bitrate(), 3);
1919
assert_eq!(f.properties().channels(), 2);
2020
assert_eq!(f.properties().sample_rate(), 44100);
21-
assert_eq!(f.properties().bit_depth(), Some(16));
21+
// NOTE: TagLib reports 16, but the stream is a lossy codec. We ignore it in this case.
22+
assert!(f.properties().bit_depth().is_none());
2223
assert!(!f.properties().is_drm_protected());
2324
assert_eq!(f.properties().codec(), &Mp4Codec::AAC);
2425
}
@@ -82,7 +83,7 @@ fn test_properties_alac_without_bitrate() {
8283
assert_eq!(f.properties().channels(), 2);
8384
assert_eq!(f.properties().sample_rate(), 44100);
8485
assert_eq!(f.properties().bit_depth(), Some(16));
85-
assert_eq!(f.properties().is_drm_protected(), false);
86+
assert!(!f.properties().is_drm_protected());
8687
assert_eq!(f.properties().codec(), &Mp4Codec::ALAC);
8788
}
8889

0 commit comments

Comments
 (0)