mirror of
https://github.com/samsonjs/media.git
synced 2026-04-04 11:05:47 +00:00
Add test for decoding ID3 PRIV frame
I wrote this whilst investigating a user issue. It looks like we don't need to do anything about the issue itself, but since I wrote the test we may as well keep it! ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143549697
This commit is contained in:
parent
9f81b72291
commit
2512bd6e77
1 changed files with 11 additions and 0 deletions
|
|
@ -63,4 +63,15 @@ public class Id3DecoderTest extends TestCase {
|
|||
assertEquals("Hello World", textInformationFrame.description);
|
||||
}
|
||||
|
||||
public void testDecodePrivFrame() throws MetadataDecoderException {
|
||||
byte[] rawId3 = new byte[] {73, 68, 51, 4, 0, 0, 0, 0, 0, 19, 80, 82, 73, 86, 0, 0, 0, 9, 0, 0,
|
||||
116, 101, 115, 116, 0, 1, 2, 3, 4};
|
||||
Id3Decoder decoder = new Id3Decoder();
|
||||
Metadata metadata = decoder.decode(rawId3, rawId3.length);
|
||||
assertEquals(1, metadata.length());
|
||||
PrivFrame privFrame = (PrivFrame) metadata.get(0);
|
||||
assertEquals("test", privFrame.owner);
|
||||
MoreAsserts.assertEquals(new byte[] {1, 2, 3, 4}, privFrame.privateData);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue