Methods Summary |
---|
public void | setUp()
configureProject(TASKDEFS_DIR + "antlr.xml");
|
public void | tearDown()
executeTarget("cleanup");
|
public void | test1()
expectBuildException("test1", "required argument, target, missing");
|
public void | test10()This test creates an html-ized version of the calculator grammar.
The sanity check is simply whether or not an html file was generated.
executeTarget("test10");
File outputDirectory = new File(System.getProperty("root"), TASKDEFS_DIR + "antlr.tmp");
String[] calcFiles = outputDirectory.list(new HTMLFilter());
assertTrue(calcFiles.length > 0);
|
public void | test11()This is just a quick sanity check to run the diagnostic option and
make sure that it doesn't throw any funny exceptions.
executeTarget("test11");
|
public void | test12()This is just a quick sanity check to run the trace option and
make sure that it doesn't throw any funny exceptions.
executeTarget("test12");
|
public void | test13()This is just a quick sanity check to run all the rest of the
trace options (traceLexer, traceParser, and traceTreeWalker) to
make sure that they don't throw any funny exceptions.
executeTarget("test13");
|
public void | test2()
expectBuildException("test2", "Invalid output directory");
|
public void | test3()
executeTarget("test3");
|
public void | test4()
executeTarget("test4");
|
public void | test5()
// should print "panic: Cannot find importVocab file 'JavaTokenTypes.txt'"
// since it needs to run java.g first before java.tree.g
expectBuildException("test5", "ANTLR returned: 1");
|
public void | test6()
executeTarget("test6");
|
public void | test7()
expectBuildException("test7", "Unable to determine generated class");
|
public void | test8()This is a negative test for the super grammar (glib) option.
expectBuildException("test8", "Invalid super grammar file");
|
public void | test9()This is a positive test for the super grammar (glib) option. ANTLR
will throw an error if everything is not correct.
executeTarget("test9");
|
public void | testNoRecompile()
executeTarget("test9");
assertEquals(-1, getFullLog().indexOf("Skipped grammar file."));
executeTarget("noRecompile");
assertTrue(-1 != getFullLog().indexOf("Skipped grammar file."));
|
public void | testNormalRecompile()
executeTarget("test9");
assertEquals(-1, getFullLog().indexOf("Skipped grammar file."));
executeTarget("normalRecompile");
assertEquals(-1, getFullLog().indexOf("Skipped grammar file."));
|
public void | testSupergrammarChangeRecompile()
executeTarget("test9");
assertEquals(-1, getFullLog().indexOf("Skipped grammar file."));
executeTarget("supergrammarChangeRecompile");
assertEquals(-1, getFullLog().indexOf("Skipped grammar file."));
|