edu.rice.cs.drjava.model
Class GlobalModelCompileTest
java.lang.Object
junit.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.GlobalModelCompileTest
- All Implemented Interfaces:
- Test
public final class GlobalModelCompileTest
- extends GlobalModelTestCase
Tests to ensure that compilation behaves correctly in border cases.
- Version:
- $Id: GlobalModelCompileTest.java 5175 2010-01-20 08:46:32Z mgricken $
| Nested classes/interfaces inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
GlobalModelTestCase.CancelingSelector, GlobalModelTestCase.CompileShouldFailListener, GlobalModelTestCase.CompileShouldSucceedListener, GlobalModelTestCase.FileMovedWarningException, GlobalModelTestCase.FileSelector, GlobalModelTestCase.InteractionListener, GlobalModelTestCase.JUnitNonTestListener, GlobalModelTestCase.JUnitTestListener, GlobalModelTestCase.OpenWarningException, GlobalModelTestCase.OverwriteException, GlobalModelTestCase.SaveCopyFileSelector, GlobalModelTestCase.TestGlobalModel, GlobalModelTestCase.TestListener, GlobalModelTestCase.WarningFileSelector |
|
Field Summary |
protected static Log |
_log
|
| Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
_doc, _interactionsController, _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 |
|
Method Summary |
void |
testCompileAbortsIfAnyUnsaved()
If we try to compile while any files are unsaved, and if we don't save when asked to saveAllBeforeProceeding,
it should not do the compile or any other actions. |
void |
testCompileAbortsIfUnsaved()
If we try to compile an unsaved file, and if we don't save when asked to saveAllBeforeProceeding, it should
not do the compile or any other actions. |
void |
testCompileActiveSavedAnyUnsavedButSaveWhenAsked()
If we try to compile while any files (but not the active file) are unsaved but we do save it from within
saveAllBeforeProceeding, the compile should occur happily. |
void |
testCompileAllWithNoFiles()
Tests calling compileAll with no source files works. |
void |
testCompileAnyUnsavedButSaveWhenAsked()
If we try to compile while any files (including the active file) are unsaved but we do save it from within saveAllBeforeProceeding, the
compile should occur happily. |
void |
testCompileResetsInteractions()
Tests that the interactions pane is reset after a successful compile. |
| Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
assertCompileErrorsPresent, assertCompileErrorsPresent, assertContents, assertInteractionsContains, assertInteractionsDoesNotContain, assertInteractionsDoesNotMatch, assertInteractionsMatches, assertLength, assertModified, assertNumOpenDocs, changeDocumentText, classForJava, createFile, doCompile, doCompile, getCompilerErrorString, getInteractionsText, interpret, interpretIgnoreResult, safeLoadHistory, safeSaveHistory, saveAllFiles, saveFile, saveFileAs, saveFileCopy, setUp, setupDocument, tearDown, tempDirectory, tempFile, tempFile, testStartCompile, writeToNewTempFile |
| 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 |
_log
protected static final Log _log
GlobalModelCompileTest
public GlobalModelCompileTest()
testCompileAllWithNoFiles
public void testCompileAllWithNoFiles()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
- Tests calling compileAll with no source files works. Does not reset interactions.
- Throws:
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
testCompileResetsInteractions
public void testCompileResetsInteractions()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException,
EditDocumentException
- Tests that the interactions pane is reset after a successful compile.
- Throws:
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
EditDocumentException
testCompileAbortsIfUnsaved
public void testCompileAbortsIfUnsaved()
throws java.lang.Exception
- If we try to compile an unsaved file, and if we don't save when asked to saveAllBeforeProceeding, it should
not do the compile or any other actions.
- Throws:
java.lang.Exception
testCompileAbortsIfAnyUnsaved
public void testCompileAbortsIfAnyUnsaved()
throws java.lang.Exception
- If we try to compile while any files are unsaved, and if we don't save when asked to saveAllBeforeProceeding,
it should not do the compile or any other actions.
- Throws:
java.lang.Exception
testCompileAnyUnsavedButSaveWhenAsked
public void testCompileAnyUnsavedButSaveWhenAsked()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
- If we try to compile while any files (including the active file) are unsaved but we do save it from within saveAllBeforeProceeding, the
compile should occur happily. Doesn't reset interactions because no interpretations are performed.
- Throws:
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
testCompileActiveSavedAnyUnsavedButSaveWhenAsked
public void testCompileActiveSavedAnyUnsavedButSaveWhenAsked()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
- If we try to compile while any files (but not the active file) are unsaved but we do save it from within
saveAllBeforeProceeding, the compile should occur happily. Does not reset interactions.
- Throws:
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException