JAL-3423 more System.lineSeparator() in place of \n
[jalview.git] / test / jalview / math / RotatableMatrixTest.java
index e04df85..fb0532d 100644 (file)
@@ -12,6 +12,8 @@ import org.testng.annotations.Test;
 
 public class RotatableMatrixTest
 {
+  private static final String NL = System.lineSeparator();
+
   private RotatableMatrix rm;
 
   @BeforeMethod(alwaysRun = true)
@@ -36,12 +38,13 @@ public class RotatableMatrixTest
   @Test(groups = "Functional")
   public void testPrint()
   {
-    String expected = "0.5 1.0 1.5\n1.0 2.0 3.0\n1.5 3.0 4.5\n";
+    String expected = "0.5 1.0 1.5" + NL + "1.0 2.0 3.0" + NL
+            + "1.5 3.0 4.5" + NL;
     ByteArrayOutputStream os = new ByteArrayOutputStream();
     PrintStream ps = new PrintStream(os, true);
     rm.print(ps);
     String result = new String(os.toByteArray());
-    assertEquals(result.replaceAll("\r", ""), expected);
+    assertEquals(result, expected);
   }
 
   @Test(groups = "Functional")