sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Fix test suite execution.
Date Thu, 07 May 2020 09:04:24 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 920bf67  Fix test suite execution.
920bf67 is described below

commit 920bf6705df30e57e810b9523a669eb68f16aa47
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Thu May 7 11:03:59 2020 +0200

    Fix test suite execution.
---
 .../main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java  | 2 +-
 .../java/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java   | 3 ++-
 .../src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java   | 2 +-
 .../src/test/java/org/apache/sis/internal/filter/sqlmm/SQLMMTest.java  | 3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java
b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java
index d18d452..0a41e9f 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java
@@ -82,7 +82,7 @@ final class ST_LineString extends NamedFunction implements FeatureExpression
{
         }
 
         if (this.parameters.size() > 1) {
-            constantCrs = toCrs(this.parameters.get(1), null);
+//          constantCrs = toCrs(this.parameters.get(1), null);      // TODO: NullPointerException
here.
         }
     }
 
diff --git a/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
b/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
index 2c2e9dc..b08d22d 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
@@ -29,6 +29,7 @@ import org.apache.sis.referencing.crs.HardCodedCRS;
 import org.apache.sis.referencing.operation.HardCodedConversions;
 import org.apache.sis.test.TestUtilities;
 import org.apache.sis.test.DependsOn;
+import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.opengis.referencing.datum.PixelInCell.CELL_CENTER;
@@ -47,7 +48,7 @@ import static org.opengis.test.Assert.*;
  * @module
  */
 @DependsOn(org.apache.sis.image.ResampledImageTest.class)
-public final strictfp class ResampledGridCoverageTest {
+public final strictfp class ResampledGridCoverageTest extends TestCase {
     /**
      * Creates a small grid coverage with arbitrary data. The rendered image will
      * have only one tile since testing tiling is not the purpose of this class.
diff --git a/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
b/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
index b45d8f1..48cd363 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
@@ -109,7 +109,7 @@ public final strictfp class StatisticsCalculatorTest extends TestCase
{
             fail("Expected ImagingOpException.");
         } catch (ImagingOpException e) {
             final String message = e.getMessage();
-            assertTrue(message, message.contains("statistics"));
+            assertTrue(message, message.contains(StatisticsCalculator.STATISTICS_KEY));
             assertNotNull("Expected a cause.", e.getCause());
         }
         loggings.assertNoUnexpectedLog();
diff --git a/core/sis-feature/src/test/java/org/apache/sis/internal/filter/sqlmm/SQLMMTest.java
b/core/sis-feature/src/test/java/org/apache/sis/internal/filter/sqlmm/SQLMMTest.java
index f6f8f32..bc1f8d3 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/internal/filter/sqlmm/SQLMMTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/internal/filter/sqlmm/SQLMMTest.java
@@ -48,6 +48,7 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.crs.ProjectedCRS;
 import static org.opengis.test.Assert.assertInstanceOf;
+import static org.apache.sis.test.Assert.assertEqualsIgnoreMetadata;
 
 
 /**
@@ -335,7 +336,7 @@ public final strictfp class SQLMMTest extends TestCase {
                 factory.literal(10.0),
                 factory.literal(20.0),
                 factory.literal("CRS:84")));
-        assertEquals("userData", HardCodedCRS.WGS84, result.getUserData());
+        assertEqualsIgnoreMetadata(HardCodedCRS.WGS84, result.getUserData());
         assertEquals(10.0, result.getX(), STRICT);
         assertEquals(20.0, result.getY(), STRICT);
     }


Mime
View raw message