8214195: Align stdout messages in test/jdk/java/math/BigInteger/PrimitiveConversionTests.java
authorbpb
Fri, 30 Nov 2018 14:48:44 -0800
changeset 52789 a051c5c8aa56
parent 52788 241b8151b6b6
child 52790 290b04fd1846
8214195: Align stdout messages in test/jdk/java/math/BigInteger/PrimitiveConversionTests.java Reviewed-by: lancea
test/jdk/java/math/BigInteger/PrimitiveConversionTests.java
--- a/test/jdk/java/math/BigInteger/PrimitiveConversionTests.java	Fri Nov 30 13:42:49 2018 -0800
+++ b/test/jdk/java/math/BigInteger/PrimitiveConversionTests.java	Fri Nov 30 14:48:44 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,6 +63,7 @@
     }
 
     public static int testDoubleValue() {
+        System.out.println("--- testDoubleValue ---");
         int failures = 0;
         for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) {
             double expected = Double.parseDouble(big.toString());
@@ -71,7 +72,8 @@
             // should be bitwise identical
             if (Double.doubleToRawLongBits(expected) != Double
                     .doubleToRawLongBits(actual)) {
-                System.out.println(big);
+                System.out.format("big: %s, expected: %f, actual: %f%n",
+                    big, expected, actual);
                 failures++;
             }
         }
@@ -79,6 +81,7 @@
     }
 
     public static int testFloatValue() {
+        System.out.println("--- testFloatValue ---");
         int failures = 0;
         for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) {
             float expected = Float.parseFloat(big.toString());
@@ -87,7 +90,8 @@
             // should be bitwise identical
             if (Float.floatToRawIntBits(expected) != Float
                     .floatToRawIntBits(actual)) {
-                System.out.println(big + " " + expected + " " + actual);
+                System.out.format("big: %s, expected: %f, actual: %f%n",
+                    big, expected, actual);
                 failures++;
             }
         }