8204355: [Graal] org.graalvm.compiler.debug.test.CSVUtilTest fails on Windows due to improper line separator used
authoriignatyev
Fri, 29 Jun 2018 13:44:13 -0700
changeset 50916 2f9a0c4fcf58
parent 50915 78711bd05b5a
child 50917 55a43beaa529
8204355: [Graal] org.graalvm.compiler.debug.test.CSVUtilTest fails on Windows due to improper line separator used Reviewed-by: kvn
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java	Fri Jun 29 13:44:09 2018 -0700
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java	Fri Jun 29 13:44:13 2018 -0700
@@ -117,8 +117,8 @@
             CSVUtil.Escape.println(new PrintStream(outputStream), format, toObjectArray(args));
             // get the actual string
             String printedStream = new String(outputStream.toByteArray(), StandardCharsets.UTF_8);
-            // remove newline
-            assertEquals(expected, printedStream.substring(0, printedStream.length() - 1));
+            // add newline to the expected string
+            assertEquals(expected + System.lineSeparator(), printedStream);
         }
 
         private static Object[] toObjectArray(String args) {