a new test

This commit is contained in:
Terence Parr 2013-09-09 15:17:27 -07:00
parent 95aa103dc2
commit 6a26f0499f
1 changed files with 10 additions and 0 deletions

View File

@ -158,6 +158,16 @@ public class TestParseTreeMatcher extends BaseTest {
pattern = "<ID> = 0;";
invertMatch = false;
checkPatternMatch("X4.g4", grammar, "s", input, pattern, "X4Parser", "X4Lexer", invertMatch);
input = "x = 0;";
pattern = "x = 0;";
invertMatch = false;
checkPatternMatch("X4.g4", grammar, "s", input, pattern, "X4Parser", "X4Lexer", invertMatch);
input = "x = 0;";
pattern = "y = 0;";
invertMatch = true;
checkPatternMatch("X4.g4", grammar, "s", input, pattern, "X4Parser", "X4Lexer", invertMatch);
}
@Test public void testAssign() throws Exception {