Author: desruisseaux
Date: Wed Mar 18 10:54:05 2015
New Revision: 1667493

URL: http://svn.apache.org/r1667493
Log:
Tests shall use StrictMath instead than Math.

Modified:
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/FormulasTest.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesViewer.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
    
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/NumberConverterTest.java

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/FormulasTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/FormulasTest.java?rev=1667493&r1=1667492&r2=1667493&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/FormulasTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/FormulasTest.java
 [UTF-8] Wed Mar 18 10:54:05 2015
@@ -47,7 +47,7 @@ public final strictfp class FormulasTest
     @Test
     public void testPow3() {
         for (int n=0; n<=8; n++) {
-            assertEquals((int) Math.round(Math.pow(3, n)), Formulas.pow3(n));
+            assertEquals((int) StrictMath.round(StrictMath.pow(3, n)), 
Formulas.pow3(n));
         }
     }
 

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesViewer.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesViewer.java?rev=1667493&r1=1667492&r2=1667493&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesViewer.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesViewer.java
 [UTF-8] Wed Mar 18 10:54:05 2015
@@ -156,7 +156,7 @@ final strictfp class ShapeUtilitiesViewe
                 break;
             }
             case COLINEAR_POINT: {
-                final double distance = Math.hypot(x4, y4);
+                final double distance = StrictMath.hypot(x4, y4);
                 input.moveTo(x1, y1);
                 input.lineTo(x2, y2);
                 addPoint(input, x3, y3);

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java?rev=1667493&r1=1667492&r2=1667493&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
 [UTF-8] Wed Mar 18 10:54:05 2015
@@ -302,7 +302,7 @@ public strictfp class TensorParametersTe
     @Test
     @DependsOnMethod("testGetAllDescriptors")
     public void testMatrixConversion() {
-        final int size = Math.min(6, TensorParameters.CACHE_SIZE);
+        final int size = StrictMath.min(6, TensorParameters.CACHE_SIZE);
         final Random random = TestUtilities.createRandomNumberGenerator();
         for (int numRow = 2; numRow <= size; numRow++) {
             for (int numCol = 2; numCol <= size; numCol++) {

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java?rev=1667493&r1=1667492&r2=1667493&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
 [UTF-8] Wed Mar 18 10:54:05 2015
@@ -183,7 +183,7 @@ public final strictfp class LinearTransf
         final Matrix m = builder.create().getMatrix();
         assertEquals("m₀₀", scale,  m.getElement(0, 0), scaleTolerance);
         assertEquals("m₀₁", offset, m.getElement(0, 1), translationTolerance);
-        assertEquals("correlation", 1, Math.abs(builder.correlation()[0]), 
scaleTolerance);
+        assertEquals("correlation", 1, 
StrictMath.abs(builder.correlation()[0]), scaleTolerance);
     }
 
     /**
@@ -201,9 +201,9 @@ public final strictfp class LinearTransf
          * Create an AffineTransform to use as the reference implementation.
          */
         final AffineTransform ref = AffineTransform.getRotateInstance(
-                rd.nextDouble() * (2 * Math.PI),    // Rotation angle
-                rd.nextDouble() * 30 - 12,          // Center X
-                rd.nextDouble() * 10 - 8);          // Center Y
+                rd.nextDouble() * (2 * StrictMath.PI),  // Rotation angle
+                rd.nextDouble() * 30 - 12,              // Center X
+                rd.nextDouble() * 10 - 8);              // Center Y
         final DirectPosition2D[] sources = new DirectPosition2D[numPts];
         final DirectPosition2D[] targets = new DirectPosition2D[numPts];
         for (int i=0; i<numPts; i++) {

Modified: 
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/NumberConverterTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/NumberConverterTest.java?rev=1667493&r1=1667492&r2=1667493&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/NumberConverterTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/NumberConverterTest.java
 [UTF-8] Wed Mar 18 10:54:05 2015
@@ -194,7 +194,7 @@ public final strictfp class NumberConver
     public void testLargeValue() {
         final long longValue = 1000000000000000010L;
         final double doubleValue = longValue;
-        assertTrue(Math.ulp(doubleValue) > 10); // Need to have more digits 
than 'double' capacity.
+        assertTrue(StrictMath.ulp(doubleValue) > 10); // Need to have more 
digits than 'double' capacity.
         runConversion(create(BigDecimal.class, Double.class),
                 BigDecimal.valueOf(longValue), Double.valueOf(doubleValue), 
BigDecimal.valueOf(doubleValue));
 


Reply via email to