コード例 #1
0
 @Test
 public void testParseFile() throws Exception {
   final String actual =
       AstTreeStringPrinter.printFileAst(
           new File(getPath("InputAstTreeStringPrinterComments.java")), false);
   final String expected =
       new String(
           Files.readAllBytes(Paths.get(getPath("expectedInputAstTreeStringPrinter.txt"))),
           StandardCharsets.UTF_8);
   Assert.assertEquals(expected, actual);
 }
コード例 #2
0
 @Test(expected = CheckstyleException.class)
 public void testParseFileThrowable() throws Exception {
   AstTreeStringPrinter.printFileAst(
       new File(getNonCompilablePath("InputAstTreeStringPrinter.java")), false);
 }