org.antlr.gunit
Class AbstractTest

java.lang.Object
  extended by org.antlr.gunit.AbstractTest
All Implemented Interfaces:
ITestCase
Direct Known Subclasses:
BooleanTest, OutputTest, ReturnTest

public abstract class AbstractTest
extends Object
implements ITestCase


Field Summary
protected  String actual
           
protected  boolean hasErrorMsg
           
protected  String header
           
 
Constructor Summary
AbstractTest()
           
 
Method Summary
 String getActual()
           
 String getActualResult()
           
abstract  String getExpected()
           
 String getExpectedResult()
           
 String getHeader()
           
abstract  String getResult(gUnitTestResult testResult)
           
 int getTestCaseIndex()
          Get the index of the test case in the test group for a rule.
 String getTestedRuleName()
          Get the name of the rule that is tested by this test case.
abstract  String getText()
           
abstract  int getType()
           
 void setActual(String actual)
           
 void setHeader(String rule, String lexicalRule, String treeRule, int numOfTest, int line)
           
 void setTestCaseIndex(int testCaseIndex)
           
 void setTestedRuleName(String testedRuleName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

header

protected String header

actual

protected String actual

hasErrorMsg

protected boolean hasErrorMsg
Constructor Detail

AbstractTest

public AbstractTest()
Method Detail

getType

public abstract int getType()

getText

public abstract String getText()

getExpected

public abstract String getExpected()

getExpectedResult

public String getExpectedResult()

getResult

public abstract String getResult(gUnitTestResult testResult)

getHeader

public String getHeader()

getActual

public String getActual()

getActualResult

public String getActualResult()

getTestedRuleName

public String getTestedRuleName()
Description copied from interface: ITestCase
Get the name of the rule that is tested by this test case.

Specified by:
getTestedRuleName in interface ITestCase
Returns:
name of the tested rule.

getTestCaseIndex

public int getTestCaseIndex()
Description copied from interface: ITestCase
Get the index of the test case in the test group for a rule. Starting from 0.

Specified by:
getTestCaseIndex in interface ITestCase
Returns:
index number of the test case.

setHeader

public void setHeader(String rule,
                      String lexicalRule,
                      String treeRule,
                      int numOfTest,
                      int line)

setActual

public void setActual(String actual)

setTestedRuleName

public void setTestedRuleName(String testedRuleName)

setTestCaseIndex

public void setTestCaseIndex(int testCaseIndex)


Copyright © 2011. All Rights Reserved.