File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
jbbp/src/test/java/com/igormaznitsa/jbbp/io Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,16 @@ private static JBBPBitInputStream asInputStreamMSB0(final int... array) {
6363 JBBPBitOrder .MSB0 );
6464 }
6565
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+
6676 @ Test
6777 public void testReadUnsignedShort_EOFforEmpty_BigEndian_EOFException () throws Exception {
6878 assertThrows (EOFException .class ,
You can’t perform that action at this time.
0 commit comments