summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util/TestValueConversion.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
committerSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
commitdf9ff7f340a5ab4e07efc613f5f264eeae63d4c7 (patch)
tree239ae276b82024b140428e6c0fe5d739fdd686a4 /src/junit/com/jogamp/common/util/TestValueConversion.java
parenteb47aaba63e3b1bf55f274a0f338f1010a017ae4 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/junit/com/jogamp/common/util/TestValueConversion.java')
-rw-r--r--src/junit/com/jogamp/common/util/TestValueConversion.java26
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());
}