Package org.antlr.gunit

## Class gUnitExecutor

- java.lang.Object
- - org.antlr.gunit.gUnitExecutor

All Implemented Interfaces:
  `ITestSuite`

Direct Known Subclasses:
  `NotifiedTestExecuter`

    public class gUnitExecutor
    extends java.lang.Object
    implements ITestSuite

### Field Summary

Fields
`java.util.List<AbstractTest>` `failures`
`GrammarInfo` `grammarInfo`
`java.util.List<AbstractTest>` `invalids`
`int` `numOfFailure`
`int` `numOfInvalidInput`
`int` `numOfSuccess`
`int` `numOfTest`

### Constructor Summary

Constructors
`gUnitExecutor​(GrammarInfo grammarInfo, java.lang.ClassLoader grammarClassLoader, java.lang.String testsuiteDir)`
`gUnitExecutor​(GrammarInfo grammarInfo, java.lang.String testsuiteDir)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `checkForValidInput​(org.antlr.runtime.CommonTokenStream tokens, java.io.PrintStream ps2)` Verify the input has been properly consumed
`protected java.lang.Class<?>` `classForName​(java.lang.String name)`
`java.lang.String` `execTest​()`
`protected java.lang.ClassLoader` `getGrammarClassLoader​()`
`protected void` `handleUnexpectedException​(java.lang.Exception e)`
`void` `onFail​(ITestCase failTest)`
`void` `onPass​(ITestCase passTest)`
`protected gUnitTestResult` `runLexer​(java.lang.String lexerName, java.lang.String testRuleName, gUnitTestInput testInput)`
`protected gUnitTestResult` `runParser​(java.lang.String parserName, java.lang.String lexerName, java.lang.String testRuleName, gUnitTestInput testInput)`
`protected gUnitTestResult` `runTreeParser​(java.lang.String parserName, java.lang.String lexerName, java.lang.String testRuleName, java.lang.String testTreeRuleName, gUnitTestInput testInput)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### grammarInfo

    public GrammarInfo grammarInfo

#### numOfTest

    public int numOfTest

#### numOfSuccess

    public int numOfSuccess

#### numOfFailure

    public int numOfFailure

#### numOfInvalidInput

    public int numOfInvalidInput

#### failures

    public java.util.List<AbstractTest> failures

#### invalids

    public java.util.List<AbstractTest> invalids

### Constructor Detail

#### gUnitExecutor

    public gUnitExecutor​(GrammarInfo grammarInfo,
                         java.lang.String testsuiteDir)

#### gUnitExecutor

    public gUnitExecutor​(GrammarInfo grammarInfo,
                         java.lang.ClassLoader grammarClassLoader,
                         java.lang.String testsuiteDir)

### Method Detail

#### getGrammarClassLoader

    protected java.lang.ClassLoader getGrammarClassLoader​()

#### classForName

    protected final java.lang.Class<?> classForName​(java.lang.String name)
                                             throws java.lang.ClassNotFoundException

Throws:
  `java.lang.ClassNotFoundException`

#### execTest

    public java.lang.String execTest​()
                              throws java.io.IOException

Throws:
  `java.io.IOException`

#### runLexer

    protected gUnitTestResult runLexer​(java.lang.String lexerName,
                                       java.lang.String testRuleName,
                                       gUnitTestInput testInput)
                                throws java.lang.Exception

Throws:
  `java.lang.Exception`

#### runParser

    protected gUnitTestResult runParser​(java.lang.String parserName,
                                        java.lang.String lexerName,
                                        java.lang.String testRuleName,
                                        gUnitTestInput testInput)
                                 throws java.lang.Exception

Throws:
  `java.lang.Exception`

#### runTreeParser

    protected gUnitTestResult runTreeParser​(java.lang.String parserName,
                                            java.lang.String lexerName,
                                            java.lang.String testRuleName,
                                            java.lang.String testTreeRuleName,
                                            gUnitTestInput testInput)
                                     throws java.lang.Exception

Throws:
  `java.lang.Exception`

#### checkForValidInput

    protected void checkForValidInput​(org.antlr.runtime.CommonTokenStream tokens,
                                      java.io.PrintStream ps2)

Verify the input has been properly consumed

#### onPass

    public void onPass​(ITestCase passTest)

Specified by:
  `onPass` in interface `ITestSuite`

#### onFail

    public void onFail​(ITestCase failTest)

Specified by:
  `onFail` in interface `ITestSuite`

#### handleUnexpectedException

    protected void handleUnexpectedException​(java.lang.Exception e)