You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2015/05/12 22:33:26 UTC
svn commit: r1679048 - in /sis/branches/JDK8/core:
sis-metadata/src/test/java/org/apache/sis/metadata/
sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/
sis-referencing/src/test/java/org/apache/sis/geometry/
sis-referencing/src/test/java/o...
Author: desruisseaux
Date: Tue May 12 20:33:25 2015
New Revision: 1679048
URL: http://svn.apache.org/r1679048
Log:
Test: promote the 'STRICT' constant to the 'TestCase' parent class, since it is shared by more than 30 test classes.
Modified:
sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/SubEnvelopeTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ServicesForMetadataTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/UnmodifiableParameterValueTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/StandardDefinitionsTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultCompoundCRSTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ContextualParametersTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransferFunctionTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsTest.java
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -43,11 +43,6 @@ import static org.apache.sis.test.Assert
@DependsOn(PropertyAccessorTest.class)
public final strictfp class SpecialCasesTest extends TestCase {
/**
- * The tolerance factor for strict comparisons of floating point values.
- */
- private static final double STRICT = 0.0;
-
- /**
* The accessor instance to be tested.
*/
private final PropertyAccessor accessor;
Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -38,11 +38,6 @@ import static org.junit.Assert.*;
*/
public final strictfp class DefaultGeographicBoundingBoxTest extends TestCase {
/**
- * The tolerance factor for strict comparisons of floating point values.
- */
- private static final double STRICT = 0.0;
-
- /**
* Asserts that the given geographic bounding box is strictly equals to the given values.
* The {@link GeographicBoundingBox#getInclusion()} is expected to be {@code true}.
*/
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -43,11 +43,6 @@ import static org.apache.sis.test.Refere
@DependsOn(GeneralDirectPositionTest.class)
public final strictfp class AbstractEnvelopeTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- static final double STRICT = 0;
-
- /**
* Enumeration of implementations to be tested.
* The {@code LAST} constant is for stopping the loops.
*/
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -25,7 +25,6 @@ import org.junit.Test;
import static org.opengis.test.Validators.*;
import static org.apache.sis.test.ReferencingAssert.*;
import static org.apache.sis.geometry.AbstractEnvelopeTest.WGS84;
-import static org.apache.sis.geometry.AbstractEnvelopeTest.STRICT;
/**
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -28,7 +28,6 @@ import static java.lang.Double.NaN;
import static org.opengis.test.Validators.*;
import static org.apache.sis.test.ReferencingAssert.*;
import static org.apache.sis.geometry.AbstractEnvelopeTest.WGS84;
-import static org.apache.sis.geometry.AbstractEnvelopeTest.STRICT;
/**
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/SubEnvelopeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/SubEnvelopeTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/SubEnvelopeTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/SubEnvelopeTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -23,7 +23,6 @@ import static java.lang.Double.NaN;
import static org.junit.Assert.*;
import static org.opengis.test.Validators.validate;
import static org.apache.sis.geometry.AbstractEnvelopeTest.WGS84;
-import static org.apache.sis.geometry.AbstractEnvelopeTest.STRICT;
/**
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -45,11 +45,6 @@ import static org.apache.sis.internal.re
*/
public final strictfp class ReferencingUtilitiesTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Tests {@link ReferencingUtilities#isGreenwichLongitudeEquals(PrimeMeridian, PrimeMeridian)}.
*/
@Test
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ServicesForMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ServicesForMetadataTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ServicesForMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ServicesForMetadataTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -50,11 +50,6 @@ import static org.apache.sis.test.TestUt
})
public final strictfp class ServicesForMetadataTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Creates a test envelope with the given CRS and initialized with
* [-10 … 70]° of longitude, [-20 … 30]° of latitude, [-40 … 60] metres of elevation
* and [51000 … 52000] modified Julian days.
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -47,13 +47,6 @@ import static org.apache.sis.test.Metada
@DependsOn(DefaultParameterDescriptorTest.class)
public final strictfp class DefaultParameterValueTest extends TestCase {
/**
- * Strict tolerance factor for floating point comparisons. In the particular
- * case of this test suite, we can afford to be strict since we will perform
- * arithmetic only on integer values.
- */
- private static final double STRICT = 0.0;
-
- /**
* Small tolerance factor for floating point comparisons resulting from some calculation.
*/
private static final double EPS = 1E-10;
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/UnmodifiableParameterValueTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/UnmodifiableParameterValueTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/UnmodifiableParameterValueTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/UnmodifiableParameterValueTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -39,11 +39,6 @@ import static org.junit.Assert.*;
@DependsOn(DefaultParameterValueTest.class)
public final strictfp class UnmodifiableParameterValueTest extends TestCase {
/**
- * Strict tolerance factor for floating point comparisons.
- */
- private static final double STRICT = 0.0;
-
- /**
* Creates an {@link UnmodifiableParameterValue} implementation for the given parameter
* and asserts that we got a new instance equivalent to the original one.
*/
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -43,11 +43,6 @@ import static org.apache.sis.test.Assert
})
public final strictfp class CRSTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Asserts that the result of {@link CRS#forCode(String)} is the given CRS.
*/
private static void verifyForCode(final SingleCRS expected, final String code) throws FactoryException {
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/StandardDefinitionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/StandardDefinitionsTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/StandardDefinitionsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/StandardDefinitionsTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -48,11 +48,6 @@ import static org.junit.Assert.*;
})
public final strictfp class StandardDefinitionsTest extends TestCase {
/**
- * The tolerance threshold for strict comparisons of floating point values.
- */
- private static final double STRICT = 0;
-
- /**
* Compares the values created by {@code StandardDefinitions} against hard-coded constants.
* This method tests the following methods:
*
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultCompoundCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultCompoundCRSTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultCompoundCRSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultCompoundCRSTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -58,11 +58,6 @@ public final strictfp class DefaultCompo
private static final DefaultTemporalCRS TIME = HardCodedCRS.TIME;
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Tests construction and serialization of a {@link DefaultCompoundCRS}.
*/
@Test
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -46,11 +46,6 @@ import static org.apache.sis.test.TestUt
})
public final strictfp class DefaultGeographicCRSTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Tests the {@link DefaultGeographicCRS#forConvention(AxesConvention)} method
* for {@link AxesConvention#POSITIVE_RANGE}.
*/
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -27,7 +27,6 @@ import org.junit.Test;
import static java.util.Collections.singletonMap;
import static org.opengis.referencing.cs.CoordinateSystem.NAME_KEY;
-import static org.apache.sis.referencing.cs.CoordinateSystemsTest.STRICT;
import static org.apache.sis.test.Assert.*;
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -51,11 +51,6 @@ import static org.apache.sis.test.Assert
})
public final strictfp class CoordinateSystemsTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- static final double STRICT = 0;
-
- /**
* Tests {@link CoordinateSystems#parseAxisDirection(String)}.
*/
@Test
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -32,7 +32,6 @@ import static java.util.Collections.sing
import static org.apache.sis.test.MetadataAssert.*;
import static org.apache.sis.referencing.cs.HardCodedAxes.*;
import static org.apache.sis.referencing.IdentifiedObjects.getProperties;
-import static org.apache.sis.referencing.cs.CoordinateSystemsTest.STRICT;
/**
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -41,11 +41,6 @@ import static org.apache.sis.test.TestUt
@DependsOn(AbstractCSTest.class)
public final strictfp class DefaultEllipsoidalCSTest extends XMLTestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* An XML file in this package containing an ellipsoidal coordinate system definition.
*/
private static final String XML_FILE = "EllipsoidalCS.xml";
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -35,11 +35,6 @@ import static org.apache.sis.test.Metada
@DependsOn(org.apache.sis.internal.referencing.AxisDirectionsTest.class)
public final strictfp class DirectionAlongMeridianTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Tests the {@link DirectionAlongMeridian#parse(AxisDirection)} method.
*/
@Test
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -55,11 +55,6 @@ import static org.apache.sis.test.Metada
})
public final strictfp class DefaultConversionTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* The rotation from a CRS using the Paris prime meridian to a CRS using the Greenwich prime meridian,
* in degrees. The definitive value is 2.5969213 grades.
*/
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -54,11 +54,6 @@ import static org.apache.sis.test.Metada
})
public final strictfp class DefaultTransformationTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Creates a geocentric CRS using the given datum.
*/
private static DefaultGeocentricCRS createCRS(final String name, final GeodeticDatum datum) {
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=1679048&r1=1679047&r2=1679048&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] Tue May 12 20:33:25 2015
@@ -39,13 +39,6 @@ import static org.junit.Assert.*;
*/
public final strictfp class LinearTransformBuilderTest extends TestCase {
/**
- * Tolerance threshold for strict floating point comparisons. This is used when the math transform has
- * been built from exactly 3 points, in which case we expect an exact solution without rounding errors
- * at the scale of {@code double} type since the implementation use double-double arithmetic.
- */
- private static final double STRICT = 0;
-
- /**
* Tests a very simple case where an exact answer is expected.
*/
@Test
@@ -65,6 +58,9 @@ public final strictfp class LinearTransf
/**
* Tests a very simple case where an exact answer is expected.
+ * Tolerance threshold is set to zero because the math transform has been built from exactly 3 points,
+ * in which case we expect an exact solution without rounding errors at the scale of the {@code double}
+ * type. This is possible because SIS implementation uses double-double arithmetic.
*/
@Test
public void testMinimalist2D() {
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java [UTF-8] Tue May 12 20:33:25 2015
@@ -64,12 +64,6 @@ public abstract strictfp class MatrixTes
protected static final boolean DETERMINIST = !DoubleDouble.DISABLED;
/**
- * A constant for any test in this class or a subclass which expect
- * a floating point value to be strictly equals to an other value.
- */
- static final double STRICT = 0;
-
- /**
* 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 StrictMath.ulp(100.0)} value is approximatively 1.4E-14.
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ContextualParametersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ContextualParametersTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ContextualParametersTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ContextualParametersTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -47,11 +47,6 @@ import static org.apache.sis.test.Metada
@DependsOn(DefaultParameterDescriptorGroupTest.class)
public final strictfp class ContextualParametersTest extends TestCase {
/**
- * For floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Creates an instance to use for testing purpose.
*/
private static ContextualParameters create(final int srcDim, final int dstDim) {
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -35,11 +35,6 @@ import static org.opengis.test.Assert.*;
*/
public final strictfp class MathTransformsTest extends TestCase {
/**
- * For floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Creates a dummy transform for testing purpose.
* The transform has the folowing properties:
*
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransferFunctionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransferFunctionTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransferFunctionTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransferFunctionTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -38,11 +38,6 @@ import static org.opengis.test.Assert.*;
@DependsOn(ExponentialTransform1DTest.class)
public final class TransferFunctionTest extends TestCase {
/**
- * For floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* Tests the creation of a linear transfer function.
*/
@Test
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] Tue May 12 20:33:25 2015
@@ -56,11 +56,6 @@ import static org.apache.sis.internal.ut
*/
public strictfp class ReferencingAssert extends MetadataAssert {
/**
- * The tolerance threshold for strict comparisons of floating point values.
- */
- private static final double STRICT = 0;
-
- /**
* For subclass constructor only.
*/
protected ReferencingAssert() {
@@ -152,8 +147,8 @@ public strictfp class ReferencingAssert
assertEquals("name", name, axis.getName().getCode());
assertEquals("abbreviation", abbreviation, axis.getAbbreviation());
assertEquals("direction", direction, axis.getDirection());
- assertEquals("minimumValue", minimumValue, axis.getMinimumValue(), STRICT);
- assertEquals("maximumValue", maximumValue, axis.getMaximumValue(), STRICT);
+ assertEquals("minimumValue", minimumValue, axis.getMinimumValue(), TestCase.STRICT);
+ assertEquals("maximumValue", maximumValue, axis.getMaximumValue(), TestCase.STRICT);
assertEquals("unit", unit, axis.getUnit());
assertEquals("rangeMeaning", rangeMeaning, axis.getRangeMeaning());
}
Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -61,11 +61,6 @@ import java.nio.charset.StandardCharsets
})
public final strictfp class ReferencingInMetadataTest extends XMLTestCase {
/**
- * Tolerance threshold for strict floating point comparisons.
- */
- private static final double STRICT = 0;
-
- /**
* The resource file which contains an XML representation
* of a {@link Metadata} object with a {@link VerticalCRS}.
*/
Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -63,11 +63,6 @@ public final strictfp class DoubleDouble
private static final double PRODUCT_TOLERANCE_FACTOR = 1E-15;
/**
- * Tolerance threshold for strict comparisons of floating point values.
- */
- private static final double STRICT = 0;
-
- /**
* The random number generator to use for the test.
*/
private final Random random = TestUtilities.createRandomNumberGenerator();
Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -40,11 +40,6 @@ import static org.apache.sis.math.Decima
@DependsOn(org.apache.sis.internal.util.NumericsTest.class)
public final strictfp class DecimalFunctionsTest extends TestCase {
/**
- * Tolerance threshold for strict comparisons of floating point values.
- */
- private static final double STRICT = 0;
-
- /**
* Verifies the values of {@link DecimalFunctions#EXPONENT_FOR_ZERO}.
*/
@Test
Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -42,11 +42,6 @@ import static org.apache.sis.internal.ut
})
public final strictfp class MathFunctionsTest extends TestCase {
/**
- * Tolerance threshold for strict comparisons of floating point values.
- */
- private static final double STRICT = 0;
-
- /**
* Small number for floating point comparisons.
*/
private static final double EPS = 1E-12;
Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsTest.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsTest.java [UTF-8] Tue May 12 20:33:25 2015
@@ -52,11 +52,6 @@ public final strictfp class StatisticsTe
private static final double EPS = 1E-10;
/**
- * Tolerance threshold for strict comparisons of floating point values.
- */
- private static final double STRICT = 0;
-
- /**
* Tests the initial state of newly constructed instance.
*/
@Test
Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java?rev=1679048&r1=1679047&r2=1679048&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java [UTF-8] Tue May 12 20:33:25 2015
@@ -56,6 +56,16 @@ import static org.apache.sis.test.TestCo
@RunWith(TestRunner.class)
public abstract strictfp class TestCase {
/**
+ * Tolerance threshold for strict comparisons of floating point numbers.
+ * This constant can be used like below, where {@code expected} and {@code actual} are {@code double} values:
+ *
+ * {@preformat java
+ * assertEquals(expected, actual, STRICT);
+ * }
+ */
+ protected static final double STRICT = 0;
+
+ /**
* A flag for code that are pending future SIS development before to be enabled.
* This flag is always set to {@code false}. It shall be used as below:
*