diff options
author | Sven Gothel <[email protected]> | 2014-02-21 12:25:36 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-02-21 12:25:36 +0100 |
commit | 4447232af0d95a4348d09d4ed03fbef48394ca3a (patch) | |
tree | 22f385831ee15bb09771ed63421b276e849064f7 /src/junit/com/jogamp/common/util/TestBitstream02.java | |
parent | dac8d11f68ffa3a35fedeab879132c5d9aa4907c (diff) |
Bug 980: Refine Bitstream API 'signed' and 'unsigned' semantics - readUInt32(..) must return long due to EOF
Diffstat (limited to 'src/junit/com/jogamp/common/util/TestBitstream02.java')
-rw-r--r-- | src/junit/com/jogamp/common/util/TestBitstream02.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/junit/com/jogamp/common/util/TestBitstream02.java b/src/junit/com/jogamp/common/util/TestBitstream02.java index dc7333c..b518df8 100644 --- a/src/junit/com/jogamp/common/util/TestBitstream02.java +++ b/src/junit/com/jogamp/common/util/TestBitstream02.java @@ -71,7 +71,7 @@ public class TestBitstream02 extends JunitTracer { final Bitstream.ByteBufferStream bbs = new Bitstream.ByteBufferStream(bb); final Bitstream<ByteBuffer> bs = new Bitstream<ByteBuffer>(bbs, false /* outputMode */); { - final byte r8 = (byte) bs.readInt8(true /* msbFirst */); + final byte r8 = (byte) bs.readUInt8(true /* msbFirst */); System.err.println("Read8.1 "+r8+", "+toHexBinaryString(r8, 8)); Assert.assertEquals(val8, r8); } @@ -81,7 +81,7 @@ public class TestBitstream02 extends JunitTracer { bs.writeInt8(true /* msbFirst */, val8); bs.setStream(bs.getSubStream(), false /* outputMode */); // switch to input-mode, implies flush() { - final byte r8 = (byte) bs.readInt8(true /* msbFirst */); + final byte r8 = (byte) bs.readUInt8(true /* msbFirst */); System.err.println("Read8.2 "+r8+", "+toHexBinaryString(r8, 8)); Assert.assertEquals(val8, r8); } @@ -119,7 +119,7 @@ public class TestBitstream02 extends JunitTracer { bs.setStream(bs.getSubStream(), false /* outputMode */); // switch to input-mode, implies flush() final int rPre = (short) bs.readBits31(true /* msbFirst */, preBits); - final byte r8 = (byte) bs.readInt8(true /* msbFirst */); + final byte r8 = (byte) bs.readUInt8(true /* msbFirst */); System.err.println("ReadPre "+rPre+", "+toBinaryString(rPre, preBits)); System.err.println("Read8 "+r8+", "+toHexBinaryString(r8, 8)); Assert.assertEquals(val8, r8); |