8066902: JavacParserTest fails on Windows
authorjlahoda
Mon, 08 Dec 2014 21:26:04 +0100
changeset 27992 83fb13ff472d
parent 27991 8f4b68523da3
child 27993 a9130450407e
8066902: JavacParserTest fails on Windows Summary: Normalizing line endings to '\n'. Reviewed-by: jjg, ksrini
langtools/test/tools/javac/parser/JavacParserTest.java
--- a/langtools/test/tools/javac/parser/JavacParserTest.java	Mon Dec 08 18:02:07 2014 +0100
+++ b/langtools/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 {