aboutsummaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util/TestBitstream00.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-21 12:25:36 +0100
committerSven Gothel <[email protected]>2014-02-21 12:25:36 +0100
commit4447232af0d95a4348d09d4ed03fbef48394ca3a (patch)
tree22f385831ee15bb09771ed63421b276e849064f7 /src/junit/com/jogamp/common/util/TestBitstream00.java
parentdac8d11f68ffa3a35fedeab879132c5d9aa4907c (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/TestBitstream00.java')
-rw-r--r--src/junit/com/jogamp/common/util/TestBitstream00.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/junit/com/jogamp/common/util/TestBitstream00.java b/src/junit/com/jogamp/common/util/TestBitstream00.java
index 767117b..d0c5613 100644
--- a/src/junit/com/jogamp/common/util/TestBitstream00.java
+++ b/src/junit/com/jogamp/common/util/TestBitstream00.java
@@ -95,11 +95,12 @@ public class TestBitstream00 extends JunitTracer {
@Test
public void test01Uint32Conversion() {
testUInt32Conversion(1, 1);
+ testUInt32Conversion(-2, -1);
testUInt32Conversion(Integer.MAX_VALUE, Integer.MAX_VALUE);
testUInt32Conversion(0xffff0000, -1);
testUInt32Conversion(0xffffffff, -1);
}
- void testUInt32Conversion(final int int32, final int expUint32Int) {
+ void testUInt32Conversion(final int int32, final int expUInt32Int) {
final String int32_hStr = toHexString(int32);
final long l = Bitstream.toUInt32Long(int32);
final String l_hStr = toHexString(l);
@@ -107,7 +108,7 @@ public class TestBitstream00 extends JunitTracer {
final String i_hStr = toHexString(i);
System.err.printf("int32_t %012d %10s -> (long) %012d %10s, (int) %012d %10s%n", int32, int32_hStr, l, l_hStr, i, i_hStr);
Assert.assertEquals(int32_hStr, l_hStr);
- Assert.assertEquals(expUint32Int, i);
+ Assert.assertEquals(expUInt32Int, i);
}
@Test