sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1651146 - in /sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform: ExponentialTransform1DTest.java LogarithmicTransform1DTest.java
Date Mon, 12 Jan 2015 17:25:31 GMT
Author: desruisseaux
Date: Mon Jan 12 17:25:31 2015
New Revision: 1651146

URL: http://svn.apache.org/r1651146
Log:
Test adjustments.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1DTest.java

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java?rev=1651146&r1=1651145&r2=1651146&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
[UTF-8] Mon Jan 12 17:25:31 2015
@@ -218,11 +218,11 @@ public final strictfp class ExponentialT
     @Test
     @DependsOnMethod("testSingleWithScale")
     public void testAffinePostConcatenation() throws TransformException {
-        messageOnFailure = "Exponential + affine transform in base 10";
+        messageOnFailure = "Exponential transform in base 10 + affine";
         testAffinePostConcatenation(10);
-        messageOnFailure = "Exponential + affine transform in base E";
+        messageOnFailure = "Exponential transform in base E + affine";
         testAffinePostConcatenation(E);
-        messageOnFailure = "Exponential + affine transform in base 8.4"; // Arbitrary base.
+        messageOnFailure = "Exponential transform in base 8.4 + affine"; // Arbitrary base.
         testAffinePostConcatenation(8.4);
     }
 
@@ -237,11 +237,11 @@ public final strictfp class ExponentialT
         "testAffinePostConcatenation"
     })
     public void testAffineConcatenations() throws TransformException {
-        messageOnFailure = "Affine + exponential + affine transform in base 10";
+        messageOnFailure = "Affine + exponential transform in base 10 + affine";
         testAffineConcatenations(10);
-        messageOnFailure = "Affine + exponential + affine transform in base E";
+        messageOnFailure = "Affine + exponential transform in base E + affine";
         testAffineConcatenations(E);
-        messageOnFailure = "Affine + exponential + affine transform in base 8.4"; // Arbitrary
base.
+        messageOnFailure = "Affine + exponential transform in base 8.4 + affine"; // Arbitrary
base.
         testAffineConcatenations(8.4);
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1DTest.java?rev=1651146&r1=1651145&r2=1651146&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1DTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1DTest.java
[UTF-8] Mon Jan 12 17:25:31 2015
@@ -127,7 +127,16 @@ public final strictfp class LogarithmicT
     }
 
     /**
-     * A single (non-concatenated) test case in base 10 without offset.
+     * Implementation of {@link #testAffineConcatenations()} for the given base.
+     */
+    private void testAffineConcatenations(final double base) throws TransformException {
+        final MathTransform1D linear = LinearTransform1D.create(C1, C0);
+        transform = MathTransforms.concatenate(linear, LogarithmicTransform1D.create(base,
OFFSET), linear);
+        run(ConcatenatedTransformDirect1D.class, base, OFFSET, true, true);
+    }
+
+    /**
+     * A single (non-concatenated) test case without offset.
      *
      * @throws TransformException should never happen.
      */
@@ -142,7 +151,7 @@ public final strictfp class LogarithmicT
     }
 
     /**
-     * A single (non-concatenated) test case in base 10 with an offset.
+     * A single (non-concatenated) test case with an offset.
      *
      * @throws TransformException should never happen.
      */
@@ -158,7 +167,7 @@ public final strictfp class LogarithmicT
     }
 
     /**
-     * Tests the concatenation of a linear operation before the exponential one in base 10.
+     * Tests the concatenation of a linear operation before the logarithmic one.
      *
      * @throws TransformException should never happen.
      */
@@ -169,27 +178,46 @@ public final strictfp class LogarithmicT
         testAffinePreConcatenation(10);
         messageOnFailure = "Affine + logarithmic transform in base E";
         testAffinePreConcatenation(E);
-        messageOnFailure = "Affine + logarithmic transform in base 8.4";
+        messageOnFailure = "Affine + logarithmic transform in base 8.4"; // Arbitrary base.
         testAffinePreConcatenation(8.4);
     }
 
     /**
-     * Tests the concatenation of a linear operation after the exponential one in base 10.
+     * Tests the concatenation of a linear operation after the logarithmic one.
      *
      * @throws TransformException should never happen.
      */
     @Test
     @DependsOnMethod("testSingleWithOffset")
     public void testAffinePostConcatenation() throws TransformException {
-        messageOnFailure = "Logarithmic + affine transform in base 10";
+        messageOnFailure = "Logarithmic transform in base 10 + affine";
         testAffinePostConcatenation(10);
-        messageOnFailure = "Logarithmic + affine transform in base E";
+        messageOnFailure = "Logarithmic transform in base E + affine";
         testAffinePostConcatenation(E);
-        messageOnFailure = "Logarithmic + affine transform in base 8.4";
+        messageOnFailure = "Logarithmic transform in base 8.4 + affine"; // Arbitrary base.
         testAffinePostConcatenation(8.4);
     }
 
     /**
+     * Tests the concatenation of a linear operation before and after the logarithmic one.
+     *
+     * @throws TransformException should never happen.
+     */
+    @Test
+    @DependsOnMethod({
+        "testAffinePreConcatenation",
+        "testAffinePostConcatenation"
+    })
+    public void testAffineConcatenations() throws TransformException {
+        messageOnFailure = "Affine + logarithmic transform in base 10 + affine";
+        testAffineConcatenations(10);
+        messageOnFailure = "Affine + logarithmic transform in base E + affine";
+        testAffineConcatenations(E);
+        messageOnFailure = "Affine + logarithmic transform in base 8.4 + affine"; // Arbitrary
base.
+        testAffineConcatenations(8.4);
+    }
+
+    /**
      * Tests the concatenation of a logarithmic operation with the exponential one.
      *
      * @throws TransformException should never happen.



Mime
View raw message