changeset 2748:f1eaade7db81

8066902: JavacParserTest fails on Windows Summary: Normalizing line endings to '\n'. Reviewed-by: jjg, ksrini
author jlahoda
date Mon, 08 Dec 2014 21:26:04 +0100
parents 84a76798cff3
children 6c2c0095eca4
files test/tools/javac/parser/JavacParserTest.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/parser/JavacParserTest.java	Mon Dec 08 18:02:07 2014 +0100
+++ b/test/tools/javac/parser/JavacParserTest.java	Mon Dec 08 21:26:04 2014 +0100
@@ -50,6 +50,7 @@
 import com.sun.source.util.Trees;
 import com.sun.tools.javac.api.JavacTaskImpl;
 import com.sun.tools.javac.main.Main;
+import com.sun.tools.javac.main.Main.Result;
 import com.sun.tools.javac.tree.JCTree;
 import java.io.IOException;
 import java.io.StringWriter;
@@ -952,8 +953,10 @@
         JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(out, fm, null,
                 Arrays.asList("-XDrawDiagnostics"), null, Arrays.asList(new MyFileObject(code)));
 
-        assertEquals("the error code is not correct", Main.Result.ERROR, ct.doCall());
-        assertEquals("the error message is not correct", expectedErrors, out.toString());
+        Result errorCode = ct.doCall();
+        assertEquals("the error code is not correct; actual:" + errorCode, Main.Result.ERROR, errorCode);
+        String actualErrors = normalize(out.toString());
+        assertEquals("the error message is not correct, actual: " + actualErrors, expectedErrors, actualErrors);
     }
 
     void run(String[] args) throws Exception {