We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4756ef commit 8b945abCopy full SHA for 8b945ab
1 file changed
jbbp/src/test/java/com/igormaznitsa/jbbp/io/JBBPBitInputStreamTest.java
@@ -63,6 +63,16 @@ private static JBBPBitInputStream asInputStreamMSB0(final int... array) {
63
JBBPBitOrder.MSB0);
64
}
65
66
+ @Test
67
+ public void testReadLsb0Msb0() throws Exception {
68
+ final byte[] data = new byte[] {0b0000_0001};
69
+ assertEquals(0b0000_0001, new JBBPBitInputStream(new ByteArrayInputStream(data)).read());
70
+ assertEquals(0b0000_0001,
71
+ new JBBPBitInputStream(new ByteArrayInputStream(data), JBBPBitOrder.LSB0).read());
72
+ assertEquals(0b1000_0000,
73
+ new JBBPBitInputStream(new ByteArrayInputStream(data), JBBPBitOrder.MSB0).read());
74
+ }
75
+
76
@Test
77
public void testReadUnsignedShort_EOFforEmpty_BigEndian_EOFException() throws Exception {
78
assertThrows(EOFException.class,
0 commit comments