Tests for methods of Float
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 22 Jan 2019 10:53:47 +0000 (10:53 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 22 Jan 2019 10:53:47 +0000 (10:53 +0000)
utils/test/JalviewJSTest.java

index 4059c6a..0d4d708 100644 (file)
@@ -36,7 +36,18 @@ public class JalviewJSTest extends JPanel
 {
   public static void main(String[] args)
   {
-    new JalviewJSTest().doTest3();
+    new JalviewJSTest().doTest4();
+  }
+
+  void doTest4() 
+  {
+         Float fl = new Float(0f);
+         System.out.println(fl.isInfinite());
+         System.out.println(fl.isNaN());
+
+         System.out.println(Float.isInfinite(0f));
+         System.out.println(Float.isFinite(0f));
+         System.out.println(Float.isNaN(0f));
   }
 
   void doTest3()