edu.rice.cs.drjava.ui
Class DefinitionsPaneMemoryLeakTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.drjava.DrJavaTestCase
              extended by edu.rice.cs.drjava.model.MultiThreadedTestCase
                  extended by edu.rice.cs.drjava.ui.DefinitionsPaneMemoryLeakTest
All Implemented Interfaces:
Test

public final class DefinitionsPaneMemoryLeakTest
extends MultiThreadedTestCase

Tests the Definitions Pane

Version:
$Id: DefinitionsPaneMemoryLeakTest.java 5436 2011-08-02 06:58:19Z mgricken $

Nested Class Summary
(package private) static class DefinitionsPaneMemoryLeakTest.DocChangeListener
           
 
Nested classes/interfaces inherited from class junit.framework.TestCase
TestCase.WrappedException
 
Field Summary
private  int _finalDocCt
           
private  int _finalPaneCt
           
private  MainFrame _frame
           
(package private)  File _tempDir
           
static boolean DUMP_STACK
           
static Log LOG
           
static int PANE_COUNT
           
private  DefinitionsDocument preventFinalization
           
private  StringBuilder sbIdHashCodes
           
 
Fields inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase
_testFailed
 
Constructor Summary
DefinitionsPaneMemoryLeakTest()
           
 
Method Summary
static File dumpHeap()
          Dumps the current heap to a file.
static String hexIdentityHashCode(Object o)
           
static void println(String s)
           
private  void runIsolatedDrJavaSession()
           
 void setUp()
          Setup method for each JUnit test case.
 void tearDown()
          If any test failed, print a message saying that some test failed in another thread (not the testing thread).
 void testDocumentPaneMemoryLeak()
           
 
Methods inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase
join, listenerFail, 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

_tempDir

File _tempDir

_frame

private volatile MainFrame _frame

preventFinalization

private volatile DefinitionsDocument preventFinalization

_finalPaneCt

private volatile int _finalPaneCt

_finalDocCt

private volatile int _finalDocCt

sbIdHashCodes

private volatile StringBuilder sbIdHashCodes

PANE_COUNT

public static final int PANE_COUNT
See Also:
Constant Field Values

DUMP_STACK

public static final boolean DUMP_STACK
See Also:
Constant Field Values

LOG

public static final Log LOG
Constructor Detail

DefinitionsPaneMemoryLeakTest

public DefinitionsPaneMemoryLeakTest()
Method Detail

setUp

public void setUp()
           throws Exception
Setup method for each JUnit test case.

Overrides:
setUp in class MultiThreadedTestCase
Throws:
Exception - This convention is mandated by the JUnit TestCase class which is an ancestor of this class.

tearDown

public void tearDown()
              throws Exception
Description copied from class: MultiThreadedTestCase
If any test failed, print a message saying that some test failed in another thread (not the testing thread).

Overrides:
tearDown in class MultiThreadedTestCase
Throws:
Exception

runIsolatedDrJavaSession

private void runIsolatedDrJavaSession()
                               throws InterruptedException,
                                      IOException
Throws:
InterruptedException
IOException

testDocumentPaneMemoryLeak

public void testDocumentPaneMemoryLeak()
                                throws InterruptedException,
                                       IOException
Throws:
InterruptedException
IOException

dumpHeap

public static File dumpHeap()
                     throws IOException,
                            InterruptedException
Dumps the current heap to a file.

Throws:
IOException
InterruptedException

hexIdentityHashCode

public static String hexIdentityHashCode(Object o)
Returns:
the identity hash code in hex.

println

public static void println(String s)