freshen unit tests

This commit is contained in:
Terence Parr 2015-01-22 16:58:17 -08:00
parent e897f7ce58
commit a3490ba322
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ public class TestParserErrors extends BaseTest {
public void testSingleTokenDeletionConsumption() throws Exception {
String grammar = "grammar T;\n" +
"myset: ('b'|'c') ;\n" +
"a: 'a' myset 'd' {Console.WriteLine($myset.stop);} ;";
"a: 'a' myset 'd' {Console.WriteLine(\"\" + $myset.stop);} ; ";
String found = execParser("T.g4", grammar, "TParser", "TLexer", "a", "aabd", false);
assertEquals("[@2,2:2='b',<1>,1:2]\n", found);
assertEquals("line 1:1 extraneous input 'a' expecting {'b', 'c'}\n", this.stderrDuringParse);
@ -80,7 +80,7 @@ public class TestParserErrors extends BaseTest {
public void testSingleSetInsertionConsumption() throws Exception {
String grammar = "grammar T;\n" +
"myset: ('b'|'c') ;\n" +
"a: 'a' myset 'd' {Console.WriteLine($myset.stop);} ;";
"a: 'a' myset 'd' {Console.WriteLine(\"\" + $myset.stop);} ; ";
String found = execParser("T.g4", grammar, "TParser", "TLexer", "a", "ad", false);
assertEquals("[@0,0:0='a',<3>,1:0]\n", found);
assertEquals("line 1:1 missing {'b', 'c'} at 'd'\n", this.stderrDuringParse);