com.ibm.test
Class TestFmwk

java.lang.Object
  |
  +--com.ibm.test.TestFmwk
All Implemented Interfaces:
TestLog
Direct Known Subclasses:
TestAll, UCharacterTest

public class TestFmwk
extends java.lang.Object
implements TestLog

TestFmwk is a base class for tests that can be run conveniently from the command line as well as under the Java test harness.

Sub-classes implement a set of methods named Test. Each of these methods performs some test. Test methods should indicate errors by calling either err or errln. This will increment the errorCount field and may optionally print a message to the log. Debugging information may also be added to the log via the log and logln methods. These methods will add their arguments to the log only if the test is being run in verbose mode.


Constructor Summary
protected TestFmwk()
           
 
Method Summary
 void err(java.lang.String message)
          Report an error
 void errln(java.lang.String message)
           
protected  int getErrorCount()
           
static java.lang.String hex(char ch)
           
static java.lang.String hex(java.lang.String s)
           
static java.lang.String hex(java.lang.StringBuffer s)
           
protected  boolean isVerbose()
           
 void log(java.lang.String message)
          Adds given string to the log if we are in verbose mode.
 void logln(java.lang.String message)
           
 void run(java.lang.String[] args)
           
protected  void run(TestFmwk childTest)
           
protected  void run(TestFmwk[] tests)
           
protected  void writeTestName(java.lang.String testName)
           
protected  void writeTestResult(int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestFmwk

protected TestFmwk()
Method Detail

run

public void run(java.lang.String[] args)
         throws java.lang.Exception

run

protected void run(TestFmwk childTest)
            throws java.lang.Exception

run

protected void run(TestFmwk[] tests)
            throws java.lang.Exception

isVerbose

protected boolean isVerbose()

log

public void log(java.lang.String message)
Adds given string to the log if we are in verbose mode.
Specified by:
log in interface TestLog

logln

public void logln(java.lang.String message)
Specified by:
logln in interface TestLog

err

public void err(java.lang.String message)
Report an error
Specified by:
err in interface TestLog

errln

public void errln(java.lang.String message)
Specified by:
errln in interface TestLog

getErrorCount

protected int getErrorCount()

writeTestName

protected void writeTestName(java.lang.String testName)

writeTestResult

protected void writeTestResult(int count)

hex

public static java.lang.String hex(char ch)

hex

public static java.lang.String hex(java.lang.String s)

hex

public static java.lang.String hex(java.lang.StringBuffer s)


Copyright (c) 1998-2000 IBM Corporation and others.