|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
edu.rice.cs.drjava.DrJavaTestCase
edu.rice.cs.drjava.model.MultiThreadedTestCase
public abstract class MultiThreadedTestCase
TestCase which can fail if another thread causes an error or failure.
| Nested Class Summary | |
|---|---|
private static class |
MultiThreadedTestCase.ExceptionHandler
Class that stores exceptions thrown in other threads so they can be rethrown in the main thread. |
| Nested classes/interfaces inherited from class junit.framework.TestCase |
|---|
TestCase.WrappedException |
| Field Summary | |
|---|---|
protected static boolean |
_testFailed
Flag to keep track of whether or not a test failed in another thread (not the testing thread). |
| Constructor Summary | |
|---|---|
MultiThreadedTestCase()
|
|
MultiThreadedTestCase(java.lang.String name)
|
|
| Method Summary | |
|---|---|
static void |
join(java.lang.Thread t)
Join with a thread, i.e. |
protected static void |
listenerFail(java.lang.String s)
This method prints the failure message to System.out and kills the JVM. |
protected static void |
listenerFail(java.lang.Throwable t)
This method prints the failure message to System.out and kills the JVM. |
void |
setUp()
Initialize test state to not failed. |
void |
tearDown()
If any test failed, print a message saying that some test failed in another thread (not the testing thread). |
static void |
wait(java.lang.Object o)
Wait for a notify or notifyAll. |
| Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase |
|---|
setConfigSetting, setDocText |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static volatile boolean _testFailed
| Constructor Detail |
|---|
public MultiThreadedTestCase()
public MultiThreadedTestCase(java.lang.String name)
| Method Detail |
|---|
public void setUp()
throws java.lang.Exception
setUp in class DrJavaTestCasejava.lang.Exception - This convention is mandated by the JUnit TestCase class which is an ancestor of this class.
public void tearDown()
throws java.lang.Exception
tearDown in class DrJavaTestCasejava.lang.Exceptionprotected static void listenerFail(java.lang.String s)
protected static void listenerFail(java.lang.Throwable t)
public static void join(java.lang.Thread t)
t - thread to join withpublic static void wait(java.lang.Object o)
o - object to wait for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||