org.antlr.stringtemplate.test
Class TestSuite

java.lang.Object
  extended by org.antlr.stringtemplate.test.TestSuite
Direct Known Subclasses:
TestEvalSpeed, TestStringTemplate

public abstract class TestSuite
extends java.lang.Object

Terence's own version of a test case. Got sick of trying to figure out the quirks of junit...this is pretty much the same functionality and only took me a few minutes to write. Only missing the gui I guess from junit.


Field Summary
 java.lang.String testName
           
 
Constructor Summary
TestSuite()
           
 
Method Summary
 void assertEqual(int result, int expecting)
           
 void assertEqual(java.lang.Object result, java.lang.Object expecting)
           
 void assertTrue(boolean test)
           
 void assertTrue(boolean test, java.lang.String message)
           
 int getFailures()
           
 int getSuccesses()
           
 void invokeTest(java.lang.String name)
           
 void runTest(java.lang.String name)
           
 void time(java.lang.String name, int n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testName

public java.lang.String testName
Constructor Detail

TestSuite

public TestSuite()
Method Detail

assertEqual

public void assertEqual(java.lang.Object result,
                        java.lang.Object expecting)
                 throws FailedAssertionException
Throws:
FailedAssertionException

assertEqual

public void assertEqual(int result,
                        int expecting)
                 throws FailedAssertionException
Throws:
FailedAssertionException

assertTrue

public void assertTrue(boolean test)
                throws FailedAssertionException
Throws:
FailedAssertionException

assertTrue

public void assertTrue(boolean test,
                       java.lang.String message)
                throws FailedAssertionException
Throws:
FailedAssertionException

time

public void time(java.lang.String name,
                 int n)
          throws java.lang.Throwable
Throws:
java.lang.Throwable

runTest

public void runTest(java.lang.String name)

invokeTest

public void invokeTest(java.lang.String name)
                throws java.lang.reflect.InvocationTargetException
Throws:
java.lang.reflect.InvocationTargetException

getFailures

public int getFailures()

getSuccesses

public int getSuccesses()


Copyright ? 2006-2010 Terence Parr