summaryrefslogtreecommitdiff
path: root/tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java
diff options
context:
space:
mode:
Diffstat (limited to 'tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java')
-rw-r--r--tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java41
1 files changed, 11 insertions, 30 deletions
diff --git a/tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java b/tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java
index 04abbcc..2a8952f 100644
--- a/tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java
+++ b/tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java
@@ -1,31 +1,7 @@
/*
- * [The "BSD license"]
- * Copyright (c) 2013 Terence Parr
- * Copyright (c) 2013 Sam Harwell
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Use of this file is governed by the BSD 3-clause license that
+ * can be found in the LICENSE.txt file in the project root.
*/
package org.antlr.v4.test.tool;
@@ -35,15 +11,21 @@ import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.LexerInterpreter;
import org.antlr.v4.runtime.ParserInterpreter;
import org.antlr.v4.runtime.tree.ParseTree;
-import org.antlr.v4.test.runtime.java.BaseTest;
import org.antlr.v4.tool.Grammar;
import org.antlr.v4.tool.LexerGrammar;
+import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
-public class TestParserInterpreter extends BaseTest {
+public class TestParserInterpreter extends BaseJavaToolTest {
+ @Before
+ @Override
+ public void testSetUp() throws Exception {
+ super.testSetUp();
+ }
+
@Test public void testEmptyStartRule() throws Exception {
LexerGrammar lg = new LexerGrammar(
"lexer grammar L;\n" +
@@ -356,7 +338,6 @@ public class TestParserInterpreter extends BaseTest {
CommonTokenStream tokens = new CommonTokenStream(lexEngine);
ParserInterpreter parser = g.createParserInterpreter(tokens);
ParseTree t = parser.parse(g.rules.get(startRule).index);
- System.out.println("parse tree: "+t.toStringTree(parser));
assertEquals(expectedParseTree, t.toStringTree(parser));
return t;
}