sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1521756 - /sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java
Date Wed, 11 Sep 2013 08:14:26 GMT
Author: desruisseaux
Date: Wed Sep 11 08:14:25 2013
New Revision: 1521756

URL: http://svn.apache.org/r1521756
Log:
Fixed a test failure on Windows platform.

Modified:
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java?rev=1521756&r1=1521755&r2=1521756&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java
[UTF-8] Wed Sep 11 08:14:25 2013
@@ -38,6 +38,7 @@ public final strictfp class ExceptionsTe
      */
     @Test
     public void testFormatChainedMessages() {
+        final String lineSeparator = System.lineSeparator();
         final FileNotFoundException cause = new FileNotFoundException("MisingFile.txt");
         cause.initCause(new Exception("Disk is not mounted."));
         final Exception e = new Exception("Can not find “MisingFile.txt”.", cause);
@@ -50,14 +51,14 @@ public final strictfp class ExceptionsTe
          *
          * But the second line shall be omitted because it duplicates the first line.
          */
-        assertEquals("Can not find “MisingFile.txt”.\n" +
+        assertEquals("Can not find “MisingFile.txt”." + lineSeparator +
                      "Disk is not mounted.",
                      Exceptions.formatChainedMessages(Locale.ENGLISH, null, e));
         /*
          * Test again with a header.
          */
-        assertEquals("Error while creating the data store.\n" +
-                     "Can not find “MisingFile.txt”.\n" +
+        assertEquals("Error while creating the data store." + lineSeparator +
+                     "Can not find “MisingFile.txt”." + lineSeparator +
                      "Disk is not mounted.",
                      Exceptions.formatChainedMessages(Locale.ENGLISH, "Error while creating
the data store.", e));
     }



Mime
View raw message