8003649: regression/langtools: tools/javac/doctree
authorjjg
Tue, 20 Nov 2012 07:21:07 -0800
changeset 14551 a47974703e03
parent 14550 284da8fb4eaf
child 14552 0512d803a331
8003649: regression/langtools: tools/javac/doctree Reviewed-by: ksrini
langtools/test/tools/javac/doctree/DocCommentTester.java
--- a/langtools/test/tools/javac/doctree/DocCommentTester.java	Mon Nov 19 16:40:54 2012 -0800
+++ b/langtools/test/tools/javac/doctree/DocCommentTester.java	Tue Nov 20 07:21:07 2012 -0800
@@ -176,6 +176,7 @@
      * Verify the structure of the DocTree AST by comparing it against golden text.
      */
     static class ASTChecker extends Checker {
+        static final String NEWLINE = System.getProperty("line.separator");
         Printer printer = new Printer();
         String source;
 
@@ -197,7 +198,7 @@
             DocCommentTree dc = trees.getDocCommentTree(path);
             printer.print(dc, out);
             out.flush();
-            String found = out.toString();
+            String found = out.toString().replace(NEWLINE, "\n");
 
             // Look for the first block comment after the first occurrence of name
             int start = source.indexOf("\n/*\n", findName(source, name));