sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1748694 - in /sis/branches/JDK7: ./ application/sis-console/src/test/java/org/apache/sis/console/CRSCommandTest.java
Date Thu, 16 Jun 2016 12:13:42 GMT
Author: desruisseaux
Date: Thu Jun 16 12:13:42 2016
New Revision: 1748694

URL: http://svn.apache.org/viewvc?rev=1748694&view=rev
Log:
Merge from JDK8 branch a fix for a test failure.

Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/CRSCommandTest.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 16 12:13:42 2016
@@ -1,4 +1,4 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1748686
+/sis/branches/JDK8:1584960-1748692
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/CRSCommandTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/CRSCommandTest.java?rev=1748694&r1=1748693&r2=1748694&view=diff
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/CRSCommandTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/CRSCommandTest.java
[UTF-8] Thu Jun 16 12:13:42 2016
@@ -21,7 +21,7 @@ import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.apache.sis.test.Assert.*;
+import static org.junit.Assert.*;
 
 
 /**
@@ -35,20 +35,20 @@ import static org.apache.sis.test.Assert
 @DependsOn(CommandRunnerTest.class)
 public final strictfp class CRSCommandTest extends TestCase {
     /**
-     * The Well Known Text for EPSG:4326.
+     * The Well Known Text for EPSG:4326 as a regular expression.
      */
     private static final String WGS84 =
-            "GeodeticCRS[\"WGS 84\",\n" +
+            "\\QGeodeticCRS[\"WGS 84\",\n" +
             "  Datum[\"World Geodetic System 1984\",\n" +
             "    Ellipsoid[\"WGS 84\", 6378137.0, 298.257223563]],\n" +
             "  CS[ellipsoidal, 2],\n" +
             "    Axis[\"Latitude (B)\", north],\n" +
             "    Axis[\"Longitude (L)\", east],\n" +
             "    Unit[\"degree\", 0.017453292519943295],\n" +
-            "  Scope[\"Horizontal component of 3D system. Used by the GPS satellite navigation
system and for NATO military geodetic surveying.\"],\n" +
-            "  Area[\"World.\"],\n" +
+            "  Scope[\"Horizontal component of 3D system.\\E.*\\Q\"],\n" +              
       // EPSG geodetic dataset provides more details here.
+            "  Area[\"\\E.*\\Q\"],\n" +                                                 
       // Language may vary because of SIS localization.
             "  BBox[-90.00, -180.00, 90.00, 180.00],\n" +
-            "  Id[\"EPSG\", 4326, \"8.9\", URI[\"urn:ogc:def:crs:EPSG:8.9:4326\"]]]\n";
+            "  Id[\"EPSG\", 4326,\\E.*\\Q URI[\"urn:ogc:def:crs:EPSG:\\E.*\\Q:4326\"]]]\n\\E";
 // Version number of EPSG dataset may vary.
 
     /**
      * Tests fetching the CRS from a simple code ({@code "EPSG:4326"}).
@@ -59,7 +59,8 @@ public final strictfp class CRSCommandTe
     public void testCode() throws Exception {
         final CRSCommand test = new CRSCommand(0, CommandRunner.TEST, "EPSG:4326");
         test.run();
-        assertMultilinesEquals(WGS84, test.outputBuffer.toString());
+        final String wkt = test.outputBuffer.toString();
+        assertTrue(wkt, wkt.matches(WGS84));
     }
 
     /**
@@ -72,7 +73,8 @@ public final strictfp class CRSCommandTe
     public void testURN() throws Exception {
         final CRSCommand test = new CRSCommand(0, CommandRunner.TEST, "urn:ogc:def:crs:epsg::4326");
         test.run();
-        assertMultilinesEquals(WGS84, test.outputBuffer.toString());
+        final String wkt = test.outputBuffer.toString();
+        assertTrue(wkt, wkt.matches(WGS84));
     }
 
     /**
@@ -85,6 +87,7 @@ public final strictfp class CRSCommandTe
     public void testHTTP() throws Exception {
         final CRSCommand test = new CRSCommand(0, CommandRunner.TEST, "http://www.opengis.net/gml/srs/epsg.xml#4326");
         test.run();
-        assertMultilinesEquals(WGS84, test.outputBuffer.toString());
+        final String wkt = test.outputBuffer.toString();
+        assertTrue(wkt, wkt.matches(WGS84));
     }
 }



Mime
View raw message