sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1554971 - in /sis/branches/JDK7/core: sis-referencing/src/test/java/org/apache/sis/referencing/datum/ sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/ sis-utility/src/test/java/org/apache/sis/internal/util/ sis-ut...
Date Thu, 02 Jan 2014 23:50:50 GMT
Author: desruisseaux
Date: Thu Jan  2 23:50:50 2014
New Revision: 1554971

URL: http://svn.apache.org/r1554971
Log:
Test classes shall use strict math.

Modified:
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java?rev=1554971&r1=1554970&r2=1554971&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java
[UTF-8] Thu Jan  2 23:50:50 2014
@@ -45,7 +45,7 @@ public final strictfp class BursaWolfPar
     /**
      * The conversion factor from arc-seconds to radians.
      */
-    private static final double TO_RADIANS = Math.PI / (180 * 60 * 60);
+    private static final double TO_RADIANS = StrictMath.PI / (180 * 60 * 60);
 
     /**
      * Returns the parameters for the <cite>WGS 72 to WGS 84 (2)</cite> transformation
(EPSG:1238).

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java?rev=1554971&r1=1554970&r2=1554971&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
[UTF-8] Thu Jan  2 23:50:50 2014
@@ -71,7 +71,7 @@ public abstract strictfp class MatrixTes
     /**
      * Tolerance factor for comparisons of floating point numbers between SIS and JAMA implementation,
      * which is {@value}. Note that the matrix element values used in this class vary between
0 and 100,
-     * and the {@code Math.ulp(100.0)} value is approximatively 1.4E-14.
+     * and the {@code StrictMath.ulp(100.0)} value is approximatively 1.4E-14.
      *
      * {@section How this value is determined}
      * Experience (by looking at {@link #statistics}) shows that the differences are usually
smaller than 1E-12.

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java?rev=1554971&r1=1554970&r2=1554971&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
[UTF-8] Thu Jan  2 23:50:50 2014
@@ -373,11 +373,11 @@ public final strictfp class DoubleDouble
     }
 
     /**
-     * Tests π values using the {@link Math#PI} constant.
+     * Tests π values using the {@link StrictMath#PI} constant.
      * This test method serves two purposes:
      *
      * <ul>
-     *   <li>Ensure that the results of small arithmetic operations on {@link Math#PI}
produce
+     *   <li>Ensure that the results of small arithmetic operations on {@link StrictMath#PI}
produce
      *       numbers that {@link DoubleDouble#errorForWellKnownValue(double)} can find.</li>
      *   <li>Compare with the values computed by the {@code qd-2.3.14} package (a C/C++
library),
      *       which is taken as the reference implementation.</li>

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java?rev=1554971&r1=1554970&r2=1554971&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java
[UTF-8] Thu Jan  2 23:50:50 2014
@@ -63,7 +63,7 @@ public final strictfp class NumericsTest
     @Test
     public void testToExp10() {
         for (int i=-2620; i<=2620; i++) {
-            assertEquals(Math.floor(i * MathFunctions.LOG10_2), toExp10(i), 0);
+            assertEquals(StrictMath.floor(i * MathFunctions.LOG10_2), toExp10(i), 0);
         }
         for (int i=-307; i<=308; i++) {
             final String value = "1E" + i;

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java?rev=1554971&r1=1554970&r2=1554971&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
[UTF-8] Thu Jan  2 23:50:50 2014
@@ -66,7 +66,7 @@ public final strictfp class DecimalFunct
         for (int i=EXPONENT_FOR_ZERO; i<=EXPONENT_FOR_MAX; i++) { // Range of allowed
exponents in base 10.
             assertEquals(parseDouble("1E"+i), pow10(i), STRICT);
         }
-        assertEquals(1000000000000000000L, Math.round(pow10(18))); // Highest value having
an exact representation.
+        assertEquals(1000000000000000000L, StrictMath.round(pow10(18))); // Highest value
having an exact representation.
     }
 
     /**



Mime
View raw message