|
||||||||||
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
edu.rice.cs.drjava.model.GlobalModelTestCase
edu.rice.cs.drjava.model.debug.DebugTestCase
public abstract class DebugTestCase
This class contains the basic fields and methods that are necessary for any test file that needs to use the JPDADebugger.
Nested Class Summary | |
---|---|
protected class |
DebugTestCase.BreakpointTestListener
DebugTestListener for all tests setting breakpoints. |
protected class |
DebugTestCase.DebugStartAndStopListener
DebugTestListener for all tests starting the debugger. |
protected class |
DebugTestCase.DebugTestListener
Listens to events from the debugger to ensure that they happen at the correct times. |
protected class |
DebugTestCase.InterpretListener
TestListener that listens for an interpretation to end, and then notifies anyone waiting on it. |
protected class |
DebugTestCase.StepTestListener
DebugTestListener for all tests using the stepper. |
Field Summary | |
---|---|
protected Debugger |
_debugger
|
protected Object |
_notifierLock
|
protected int |
_pendingNotifies
|
protected static String |
CLASS_WITH_STATIC_FIELD
|
protected static String |
DEBUG_CLASS
|
protected static String |
DEBUG_CLASS_WITH_PACKAGE
|
protected static String |
INNER_CLASS_WITH_LOCAL_VARS
|
protected static String |
MONKEY_CLASS
|
protected static String |
MONKEY_STATIC_STUFF
|
protected static String |
MONKEY_WITH_INNER_CLASS
|
protected static String |
SUSPEND_CLASS
|
protected static String |
THREAD_DEATH_CLASS
|
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
---|
_doc, _interactionsController, _log, _model, _tempDir, BAR_TEXT, BAZ_TEXT, FOO_MISSING_CLOSE_TEXT, FOO_PACKAGE_AFTER_IMPORT, FOO_PACKAGE_AS_FIELD, FOO_PACKAGE_AS_FIELD_2, FOO_PACKAGE_AS_PART_OF_FIELD, FOO_PACKAGE_INSIDE_CLASS, FOO_TEXT |
Fields inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase |
---|
_testFailed |
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase |
---|
TEST_DRJAVA_CONFIG_PROPERTY |
Constructor Summary | |
---|---|
DebugTestCase()
|
Method Summary | |
---|---|
protected void |
_asyncDoSetCurrentThread(DebugThreadData th)
Sets the current thread in a new thread to avoid being notified of events before we start waiting for them. |
protected void |
_asyncResume()
Resumes the debugger asynchronously so as to aovid getting notified before we start waiting for notifies |
protected void |
_asyncStep(Debugger.StepType type)
Resumes the debugger asynchronously so as to avoid getting notified before we start waiting for notifies. |
protected void |
_doSetCurrentThread(DebugThreadData t)
Sets the current debugger thread to the specified thread t. |
protected void |
_notifyLock()
Notifies _notifierLock if the after the notify count has expired. |
protected void |
_setPendingNotifies(int n)
Ensures that the given object will wait for n notifications. |
protected void |
_shutdownAndWaitForInteractionEnded()
Cleanly shuts down the debugger, waiting for a suspended interaction to complete. |
protected void |
_shutdownWithoutSuspendedInteraction()
Cleanly shuts down the debugger, without having to wait for a suspended interaction to complete. |
protected OpenDefinitionsDocument |
_startupDebugger(File file,
String classText)
Cleanly starts the debugger with a newly compiled file saved in a temporary directory. |
protected OpenDefinitionsDocument |
_startupDebugger(String fileName,
String classText)
Cleanly starts the debugger with a newly compiled file saved in a temporary directory. |
void |
setUp()
Sets up the debugger for each test. |
void |
tearDown()
Cleans up the debugger after each test. |
Methods inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase |
---|
join, listenerFail, wait |
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 volatile int _pendingNotifies
protected final Object _notifierLock
protected volatile Debugger _debugger
protected static final String DEBUG_CLASS
protected static final String DEBUG_CLASS_WITH_PACKAGE
protected static final String SUSPEND_CLASS
protected static final String MONKEY_CLASS
protected static final String MONKEY_WITH_INNER_CLASS
protected static final String INNER_CLASS_WITH_LOCAL_VARS
protected static final String CLASS_WITH_STATIC_FIELD
protected static final String MONKEY_STATIC_STUFF
protected static final String THREAD_DEATH_CLASS
Constructor Detail |
---|
public DebugTestCase()
Method Detail |
---|
public void setUp() throws Exception
setUp
in class GlobalModelTestCase
Exception
- This convention is mandated by the JUnit TestCase class which is an ancestor of this class.public void tearDown() throws Exception
tearDown
in class GlobalModelTestCase
Exception
protected void _setPendingNotifies(int n) throws InterruptedException
n
- The number of times to be "notified" through _notifyLock
InterruptedException
protected void _notifyLock()
protected OpenDefinitionsDocument _startupDebugger(String fileName, String classText) throws Exception
fileName
- Name of the file to save in a temp directoryclassText
- String containing the code for the class to compile
Exception
protected OpenDefinitionsDocument _startupDebugger(File file, String classText) throws Exception
file
- File to save the class inclassText
- String containing the code for the class to compile
Exception
protected void _shutdownWithoutSuspendedInteraction() throws Exception
Exception
protected void _shutdownAndWaitForInteractionEnded() throws Exception
Exception
protected void _doSetCurrentThread(DebugThreadData t) throws DebugException
DebugException
protected void _asyncStep(Debugger.StepType type)
protected void _asyncResume()
protected void _asyncDoSetCurrentThread(DebugThreadData th)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |