test/java/lang/Math/Rint.java

Print this page

        

@@ -23,14 +23,15 @@
 
 /*
  * @test
  * @bug 4101566 4831589
  * @summary Check for correct implementation of Math.rint(double)
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.DoubleUtils jdk.testlibrary.FloatUtils
+ * @run main Rint
  */
 
-import sun.misc.DoubleConsts;
-
 public class Rint {
 
     static int testRintCase(double input, double expected) {
         int failures = 0;
         double result;

@@ -49,12 +50,12 @@
         double twoToThe52 = Math.scalb(1.0, 52); // 2^52
 
         double [][] testCases = {
             {0.0,                               0.0},
             {Double.MIN_VALUE,                  0.0},
-            {Math.nextDown(DoubleConsts.MIN_NORMAL), 0.0},
-            {DoubleConsts.MIN_NORMAL,           0.0},
+            {Math.nextDown(Double.MIN_NORMAL),  0.0},
+            {Double.MIN_NORMAL,                 0.0},
 
             {0.2,                               0.0},
 
             {Math.nextDown(0.5),             0.0},
             {              0.5,              0.0},