Explicitly check array lengths.

This commit is contained in:
akwizgran
2016-02-29 11:51:16 +00:00
parent e28dc17881
commit 5045b58e01
2 changed files with 12 additions and 4 deletions

View File

@@ -55,7 +55,11 @@ public class BdfDictionaryTest extends BriarTestCase {
BdfDictionary d = new BdfDictionary();
d.put("foo", new byte[123]);
d.put("bar", new Bytes(new byte[123]));
assertArrayEquals(new byte[123], d.getRaw("foo"));
assertArrayEquals(new byte[123], d.getRaw("bar"));
byte[] foo = d.getRaw("foo");
assertEquals(123, foo.length);
assertArrayEquals(new byte[123], foo);
byte[] bar = d.getRaw("bar");
assertEquals(123, bar.length);
assertArrayEquals(new byte[123], bar);
}
}