frysk.junit
Class Runner

java.lang.Object
  extended by junit.runner.BaseTestRunner
      extended by junit.textui.TestRunner
          extended by frysk.junit.Runner
All Implemented Interfaces:
TestListener

public class Runner
extends TestRunner

frysk specific extension to the JUnit test framework.


Field Summary
private  Prefix config32
           
private  Prefix config64
           
private  Prefix configAll
          Possible configurations.
private  ArrayList excludeTests
           
private static Log fine
           
private  ArrayList includeTests
           
private  boolean listClassesOnly
           
private  LinkedList otherArgs
           
private static String programBasename
           
private  int repeatValue
           
private static boolean skipUnresolvedTests
          Should the known-to-be-broken tests run?
private  Collection testCases
           
private  String testFilter
           
 
Fields inherited from class junit.textui.TestRunner
EXCEPTION_EXIT, FAILURE_EXIT, SUCCESS_EXIT
 
Fields inherited from class junit.runner.BaseTestRunner
SUITE_METHODNAME
 
Constructor Summary
Runner(String programBasename, String[] args, Prefix configAll, Prefix config32, Prefix config64)
          Create a JUnit TestRunner, using command-line arguments args, and the supplied testClasses.
 
Method Summary
private  Parser createCommandLineParser(String programName)
          Create and return the command line parser used by frysk's JUnit tests.
static String getProgramBasename()
          Return the TestRunner's true basename - it could be "funit" or it could be "TestRunner".
 Collection getTestCases()
           
private  int runCases(Collection testClasses)
           
 int runTestCases(Collection tests)
          Run the testcases carried by testClasses.
 void setTestCases(Collection testCases)
           
(package private) static boolean unresolved(int bug, boolean unresolved)
          A method that returns true, and reports "UNRESOLVED".
(package private) static boolean unresolved(String bug, boolean unresolved)
          A method that returns true, and reports "UNRESOLVED".
(package private) static boolean unsupported(String reason, boolean unsupported)
          An unsupported feature; can't test.
static void usage(String message, int exitVal)
           
private  int worstResult(int lhs, int rhs)
          Merge two TestRunner results returning the most fatal.
 
Methods inherited from class junit.textui.TestRunner
createTestResult, doRun, doRun, getLoader, main, pause, run, run, runAndWait, runFailed, setPrinter, start, testEnded, testFailed, testStarted
 
Methods inherited from class junit.runner.BaseTestRunner
addError, addFailure, clearStatus, elapsedTimeAsString, endTest, extractClassName, getFilteredTrace, getFilteredTrace, getPreference, getPreference, getPreferences, getTest, inVAJava, loadSuiteClass, processArguments, savePreferences, setLoading, setPreference, setPreferences, showStackRaw, startTest, truncate, useReloadingTestSuiteLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fine

private static final Log fine

repeatValue

private int repeatValue

testCases

private Collection testCases

listClassesOnly

private boolean listClassesOnly

testFilter

private String testFilter

excludeTests

private ArrayList excludeTests

includeTests

private ArrayList includeTests

otherArgs

private LinkedList otherArgs

programBasename

private static String programBasename

configAll

private final Prefix configAll
Possible configurations.


config32

private final Prefix config32

config64

private final Prefix config64

skipUnresolvedTests

private static boolean skipUnresolvedTests
Should the known-to-be-broken tests run?

Constructor Detail

Runner

public Runner(String programBasename,
              String[] args,
              Prefix configAll,
              Prefix config32,
              Prefix config64)
Create a JUnit TestRunner, using command-line arguments args, and the supplied testClasses.

Method Detail

usage

public static void usage(String message,
                         int exitVal)

setTestCases

public void setTestCases(Collection testCases)

getTestCases

public Collection getTestCases()

runCases

private int runCases(Collection testClasses)

createCommandLineParser

private Parser createCommandLineParser(String programName)
Create and return the command line parser used by frysk's JUnit tests.


getProgramBasename

public static String getProgramBasename()
Return the TestRunner's true basename - it could be "funit" or it could be "TestRunner". XXX: Hack, shouldn't be using static storage for this. Should this go in frysk.Prefix?


worstResult

private int worstResult(int lhs,
                        int rhs)
Merge two TestRunner results returning the most fatal.


runTestCases

public int runTestCases(Collection tests)
Run the testcases carried by testClasses.

Parameters:
testClasses -
Returns:
int the value of exit.

unresolved

static boolean unresolved(int bug,
                          boolean unresolved)
A method that returns true, and reports "UNRESOLVED". Used by test cases that want to be skipped (vis: if (broken()) return) while trying to avoid the compiler's optimizer realizing that the rest of the function is dead.


unresolved

static boolean unresolved(String bug,
                          boolean unresolved)
A method that returns true, and reports "UNRESOLVED". Used by test cases that want to be skipped (vis: if (broken()) return) while trying to avoid the compiler's optimizer realizing that the rest of the function is dead.


unsupported

static boolean unsupported(String reason,
                           boolean unsupported)
An unsupported feature; can't test.