From 6a26f0499fe943117f80c7bb5fc8179495e30412 Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Mon, 9 Sep 2013 15:17:27 -0700 Subject: [PATCH] a new test --- tool/test/org/antlr/v4/test/TestParseTreeMatcher.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java b/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java index c8708cf70..8ee8abe59 100644 --- a/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java +++ b/tool/test/org/antlr/v4/test/TestParseTreeMatcher.java @@ -158,6 +158,16 @@ public class TestParseTreeMatcher extends BaseTest { pattern = " = 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 {