org.antlr.gunit
Class gUnitBaseTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.antlr.gunit.gUnitBaseTest
All Implemented Interfaces:
junit.framework.Test

public abstract class gUnitBaseTest
extends junit.framework.TestCase

All gUnit-generated JUnit class should extend this class which implements the essential methods for triggering ANTLR parser/tree walker


Field Summary
 String lexerPath
           
 String packagePath
           
 String parserPath
           
protected  String stderr
           
protected  String stdout
           
 String treeAdaptorPath
           
 String treeParserPath
           
 
Constructor Summary
gUnitBaseTest()
           
 
Method Summary
 Object examineExecResult(int tokenType, Object retVal)
           
 String execLexer(String testRuleName, int line, String testInput, boolean isFile)
           
 Object execParser(String testRuleName, int line, String testInput, boolean isFile)
           
 Object execTreeParser(String testTreeRuleName, String testRuleName, String testInput, boolean isFile)
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

treeAdaptorPath

public String treeAdaptorPath

packagePath

public String packagePath

lexerPath

public String lexerPath

parserPath

public String parserPath

treeParserPath

public String treeParserPath

stdout

protected String stdout

stderr

protected String stderr
Constructor Detail

gUnitBaseTest

public gUnitBaseTest()
Method Detail

execLexer

public String execLexer(String testRuleName,
                        int line,
                        String testInput,
                        boolean isFile)
                 throws Exception
Throws:
Exception

execParser

public Object execParser(String testRuleName,
                         int line,
                         String testInput,
                         boolean isFile)
                  throws Exception
Throws:
Exception

execTreeParser

public Object execTreeParser(String testTreeRuleName,
                             String testRuleName,
                             String testInput,
                             boolean isFile)
                      throws Exception
Throws:
Exception

examineExecResult

public Object examineExecResult(int tokenType,
                                Object retVal)


Copyright © 2011. All Rights Reserved.