forked from jasder/antlr
improve gunit in v4
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 7388]
This commit is contained in:
parent
b5be319b9b
commit
0c254d7629
|
@ -9,7 +9,7 @@ import org.junit.Test;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class <className> extends org.antlr.v4.gunit.jUnitBaseTest {
|
public class <className> extends org.antlr.v4.gunit.gUnitBase {
|
||||||
@Before public void setup() {
|
@Before public void setup() {
|
||||||
lexerClassName = "<options.lexer>";
|
lexerClassName = "<options.lexer>";
|
||||||
parserClassName = "<options.parser>";
|
parserClassName = "<options.parser>";
|
||||||
|
|
|
@ -6,7 +6,7 @@ import org.antlr.runtime.tree.TreeAdaptor;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
public class jUnitBaseTest {
|
public class gUnitBase {
|
||||||
public String lexerClassName;
|
public String lexerClassName;
|
||||||
public String parserClassName;
|
public String parserClassName;
|
||||||
public String adaptorClassName;
|
public String adaptorClassName;
|
|
@ -2,11 +2,12 @@ package org.antlr.v4.test;
|
||||||
|
|
||||||
import org.antlr.runtime.*;
|
import org.antlr.runtime.*;
|
||||||
import org.antlr.runtime.tree.*;
|
import org.antlr.runtime.tree.*;
|
||||||
|
import org.antlr.v4.gunit.gUnitBase;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class TestASTStructure extends org.antlr.v4.gunit.jUnitBaseTest {
|
public class TestASTStructure extends gUnitBase {
|
||||||
@Before public void setup() {
|
@Before public void setup() {
|
||||||
lexerClassName = "org.antlr.v4.parse.ANTLRLexer";
|
lexerClassName = "org.antlr.v4.parse.ANTLRLexer";
|
||||||
parserClassName = "org.antlr.v4.parse.ANTLRParser";
|
parserClassName = "org.antlr.v4.parse.ANTLRParser";
|
||||||
|
@ -423,5 +424,5 @@ public class TestASTStructure extends org.antlr.v4.gunit.jUnitBaseTest {
|
||||||
Object actual = ((Tree)rstruct.getTree()).toStringTree();
|
Object actual = ((Tree)rstruct.getTree()).toStringTree();
|
||||||
Object expecting = "(= x (^ A))";
|
Object expecting = "(= x (^ A))";
|
||||||
assertEquals("testing rule element", expecting, actual);
|
assertEquals("testing rule element", expecting, actual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue