Tue, 20 Nov 2012 07:21:07 -0800
8003649: regression/langtools: tools/javac/doctree
Reviewed-by: ksrini
test/tools/javac/doctree/DocCommentTester.java | file | annotate | diff | comparison | revisions |
1.1 --- a/test/tools/javac/doctree/DocCommentTester.java Mon Nov 19 16:40:54 2012 -0800 1.2 +++ b/test/tools/javac/doctree/DocCommentTester.java Tue Nov 20 07:21:07 2012 -0800 1.3 @@ -176,6 +176,7 @@ 1.4 * Verify the structure of the DocTree AST by comparing it against golden text. 1.5 */ 1.6 static class ASTChecker extends Checker { 1.7 + static final String NEWLINE = System.getProperty("line.separator"); 1.8 Printer printer = new Printer(); 1.9 String source; 1.10 1.11 @@ -197,7 +198,7 @@ 1.12 DocCommentTree dc = trees.getDocCommentTree(path); 1.13 printer.print(dc, out); 1.14 out.flush(); 1.15 - String found = out.toString(); 1.16 + String found = out.toString().replace(NEWLINE, "\n"); 1.17 1.18 // Look for the first block comment after the first occurrence of name 1.19 int start = source.indexOf("\n/*\n", findName(source, name));