diff options
Diffstat (limited to 'src/junit/com/jogamp/common/util/TestValueConversion.java')
-rw-r--r-- | src/junit/com/jogamp/common/util/TestValueConversion.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/junit/com/jogamp/common/util/TestValueConversion.java b/src/junit/com/jogamp/common/util/TestValueConversion.java index 13cd0cd..6c86803 100644 --- a/src/junit/com/jogamp/common/util/TestValueConversion.java +++ b/src/junit/com/jogamp/common/util/TestValueConversion.java @@ -99,15 +99,15 @@ public class TestValueConversion { @Test public void testConversion() { - byte sb0 = 127; - byte sb1 = -128; + final byte sb0 = 127; + final byte sb1 = -128; - float sf0 = byte_to_float(sb0, true); - float sf1 = byte_to_float(sb1, true); - short ss0 = byte_to_short(sb0, true, true); - short ss1 = byte_to_short(sb1, true, true); - int si0 = byte_to_int(sb0, true, true); - int si1 = byte_to_int(sb1, true, true); + final float sf0 = byte_to_float(sb0, true); + final float sf1 = byte_to_float(sb1, true); + final short ss0 = byte_to_short(sb0, true, true); + final short ss1 = byte_to_short(sb1, true, true); + final int si0 = byte_to_int(sb0, true, true); + final int si1 = byte_to_int(sb1, true, true); Assert.assertEquals(1.0f, sf0, 0.0); Assert.assertEquals(-1.0f, sf1, 0.0); @@ -121,10 +121,10 @@ public class TestValueConversion { Assert.assertEquals(sb0, int_to_byte(si0, true, true)); Assert.assertEquals(sb1, int_to_byte(si1, true, true)); - byte ub0 = (byte) 0xff; - float uf0 = byte_to_float(ub0, false); - short us0 = byte_to_short(ub0, false, false); - int ui0 = byte_to_int(ub0, false, false); + final byte ub0 = (byte) 0xff; + final float uf0 = byte_to_float(ub0, false); + final short us0 = byte_to_short(ub0, false, false); + final int ui0 = byte_to_int(ub0, false, false); Assert.assertEquals(1.0f, uf0, 0.0); Assert.assertEquals((short)0xffff, us0); @@ -134,7 +134,7 @@ public class TestValueConversion { Assert.assertEquals(us0, int_to_short(ui0, false, false)); } - public static void main(String args[]) { + public static void main(final String args[]) { org.junit.runner.JUnitCore.main(TestValueConversion.class.getName()); } |