Make sure code generation was successful before attempting to compile

This commit is contained in:
Sam Harwell 2014-08-09 10:54:30 -05:00
parent 8e69a5b99d
commit 550a737acf
1 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
/** */
public class TestLeftRecursion extends BaseTest {
@ -646,7 +647,8 @@ public class TestLeftRecursion extends BaseTest {
}
public void runTests(String grammar, String[] tests, String startRule) {
rawGenerateAndBuildRecognizer("T.g4", grammar, "TParser", "TLexer");
boolean success = rawGenerateAndBuildRecognizer("T.g4", grammar, "TParser", "TLexer");
assertTrue(success);
writeRecognizerAndCompile("TParser",
"TLexer",
startRule,