frysk.junit
Class TestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by frysk.junit.TestCase
All Implemented Interfaces:
Test
Direct Known Subclasses:
EventLoopTestBed, GuiTestCase, SignalWaiter, TestActionManager, TestAddressSpace, TestArithmetics, TestArray, TestAsserts, TestAuxv, TestBuildCompiler, TestByteBuffer, TestCmdLine, TestComparable, TestCompletion, TestComposite, TestCountDownLatch, TestDecoratorTypes, TestDemangler, TestDOM, TestDwarfDie, TestDwfl, TestElf, TestEnum, TestEnviron, TestEquals, TestExpect, TestFileDescriptor, TestFilterManager, TestFloatingPoint, TestFloatingPoint854Format, TestFork, TestForkFactory, TestFormat, TestFrameIdentifier, TestFrameLevel, TestGarbageCollect, TestGccClass, TestGlade, TestGlob, TestIconManager, TestIntegerType, TestInterpreter, TestISA, TestLeakingFileDescriptor, TestLib, TestLib, TestLib, TestLib, TestLocalMemory, TestLocation, TestMaps, TestPacking, TestPipePair, TestPointer, TestPrefix, TestProcBuilder, TestProcessIdentifier, TestPseudoTerminal, TestPtrace, TestRegex, TestRegisterMap, TestRegisters, TestRegisterSet, TestSetParser, TestSigChild, TestSignal, TestSignalSet, TestSignalWaiter, TestStat, TestStatelessFile, TestStatus, TestTearDownExpect, TestTearDownFile, TestTearDownProcess, TestUnwind, TestUtrace, TestValue, TestWait

public class TestCase
extends TestCase

frysk specific extension to the JUnit test framework's TestCase.


Field Summary
private static int timeoutSeconds
           
private static Uname uname
          Results from uname(2) call.
private static KernelVersion version
           
 
Constructor Summary
TestCase()
           
 
Method Summary
static void assertEquals(String what, BigInteger correct, BigInteger test)
          The BigIntegers have identical values.
static void assertEquals(String what, byte[] correct, byte[] test)
          The two byte arrays have identical contents.
static void assertEquals(String what, long correct, BigInteger test)
          The BigInteger is equal to the long value (when compared as BigIntegers).
static void assertEquals(String what, long correct, long test)
          Override JUnit's long == with one that prints failing values in hex.
static void assertEquals(String what, String[] correct, String[] test)
          The two String arrays are equal.
static long getTimeoutMilliseconds()
          A milli-second timeout.
static int getTimeoutSeconds()
          A second timeout.
protected static boolean missing32or64()
          The test requires both 32-bit and 64-bit executables.
(package private) static void setTimeoutSeconds(int timeoutSeconds)
          Set the second-timeout.
protected static boolean unresolved(int bug)
          The test has problems that have not been resolved on all systems; see BUG for more details.
protected static boolean unresolvedOffUtrace(int bug)
          A method that returns true, and prints UNRESOLVED, when the build kernel excludes utrace.
private static boolean unresolvedOn(int bug, KernelMatch matcher)
           
protected static boolean unresolvedOn32On64(int bug)
          The test has problems that have not been resolved on 64-bit systems trying to control a 32-bit process; see BUG for more details.
protected static boolean unresolvedOnIA32(int bug)
          The test has problems that have not been resolved on a X8664 system; see BUG for more details.
protected static boolean unresolvedOnPPC(int bug)
          The test has problems that have not been resolved on a PPC system; see BUG for more details.
protected static boolean unresolvedOnUtrace(int bug)
          A method that returns true, and prints UNRESOLVED, when the build kernel includes UTRACE.
protected static boolean unresolvedOnx8664(int bug)
          The test has problems that have not been resolved on a X8664 system; see BUG for more details.
protected static boolean unsupported(String reason, boolean notSupported)
          A method that returns true, and reports UNSUPPORTED.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

timeoutSeconds

private static int timeoutSeconds

uname

private static Uname uname
Results from uname(2) call.


version

private static KernelVersion version
Constructor Detail

TestCase

public TestCase()
Method Detail

setTimeoutSeconds

static void setTimeoutSeconds(int timeoutSeconds)
Set the second-timeout.


getTimeoutSeconds

public static int getTimeoutSeconds()
A second timeout.


getTimeoutMilliseconds

public static long getTimeoutMilliseconds()
A milli-second timeout.


missing32or64

protected static boolean missing32or64()
The test requires both 32-bit and 64-bit executables. This method returns true, and reports either UNSUPPORTED (32-bit) or UNRESOLVED (64-bit), when a full 32-bit and 64-bit testing environment is not available.


unsupported

protected static boolean unsupported(String reason,
                                     boolean notSupported)
A method that returns true, and reports UNSUPPORTED.


unresolved

protected static boolean unresolved(int bug)
The test has problems that have not been resolved on all systems; see BUG for more details. Return true and report UNRESOLVED when called.


unresolvedOnPPC

protected static boolean unresolvedOnPPC(int bug)
The test has problems that have not been resolved on a PPC system; see BUG for more details. Return true and report UNRESOLVED when running on a PowerPC.


unresolvedOnIA32

protected static boolean unresolvedOnIA32(int bug)
The test has problems that have not been resolved on a X8664 system; see BUG for more details. Return true and report UNRESOLVED when running on a X8664.


unresolvedOnx8664

protected static boolean unresolvedOnx8664(int bug)
The test has problems that have not been resolved on a X8664 system; see BUG for more details. Return true and report UNRESOLVED when running on a X8664.


unresolvedOn32On64

protected static boolean unresolvedOn32On64(int bug)
The test has problems that have not been resolved on 64-bit systems trying to control a 32-bit process; see BUG for more details. Returns true and reports UNRESOLVED when testing 32-bit programs on a 64-bit system.


unresolvedOn

private static boolean unresolvedOn(int bug,
                                    KernelMatch matcher)

unresolvedOnUtrace

protected static boolean unresolvedOnUtrace(int bug)
A method that returns true, and prints UNRESOLVED, when the build kernel includes UTRACE.


unresolvedOffUtrace

protected static boolean unresolvedOffUtrace(int bug)
A method that returns true, and prints UNRESOLVED, when the build kernel excludes utrace.


assertEquals

public static void assertEquals(String what,
                                byte[] correct,
                                byte[] test)
The two byte arrays have identical contents.


assertEquals

public static void assertEquals(String what,
                                BigInteger correct,
                                BigInteger test)
The BigIntegers have identical values.


assertEquals

public static void assertEquals(String what,
                                long correct,
                                BigInteger test)
The BigInteger is equal to the long value (when compared as BigIntegers).


assertEquals

public static void assertEquals(String what,
                                String[] correct,
                                String[] test)
The two String arrays are equal.


assertEquals

public static void assertEquals(String what,
                                long correct,
                                long test)
Override JUnit's long == with one that prints failing values in hex.