|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--edu.rice.cs.drjava.model.GlobalModelTestCase | +--edu.rice.cs.drjava.model.GlobalModelCompileTest
A test on the GlobalModel for compilation.
Field Summary | |
private static String |
BAR_MISSING_SEMI_TEXT
|
private static String |
FOO_MISSING_CLOSE_TEXT
|
private static String |
FOO_NON_PUBLIC_CLASS_TEXT
|
private static String |
FOO_PACKAGE_AFTER_IMPORT
|
private static String |
FOO_PACKAGE_AS_FIELD
|
private static String |
FOO_PACKAGE_AS_FIELD_2
|
private static String |
FOO_PACKAGE_AS_PART_OF_FIELD
|
private static String |
FOO_PACKAGE_INSIDE_CLASS
|
private static String |
FOO_WITH_ASSERT
|
private static String |
FOO2_EXTENDS_FOO_TEXT
|
private static String |
FOO2_REFERENCES_NON_PUBLIC_CLASS_TEXT
|
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
_model, _originalModel, _tempDir, BAR_TEXT, BAZ_TEXT, FOO_TEXT |
Fields inherited from class junit.framework.TestCase |
fName |
Constructor Summary | |
GlobalModelCompileTest(String name)
Constructor. |
Method Summary | |
private String |
_name()
|
void |
runBare()
Overrides TestCase.runBare() to interatively run this
test case for each compiler. |
static Test |
suite()
Creates a test suite for JUnit to run. |
void |
testClassFileSynchronization()
After creating a new file, saving, and compiling it, this test checks that the new document is in sync after compiling and is out of sync after modifying and even saving it. |
void |
testClassFileSynchronizationAfterRename()
Ensure that renaming a file makes it out of sync with its class file. |
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 |
testCompileAfterFileMoved()
Tests a compile after a file has unexpectedly been moved or deleted. |
void |
testCompileAllDifferentSourceRoots()
Tests calling compileAll with different source roots works. |
void |
testCompileAllFailsDifferentSourceRoots()
Tests calling compileAll with different source roots works if the files have errors in them. |
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 |
testCompileClasspathOKDefaultPackage()
Test that one compiled file can depend on the other and that when a keyword is part of a field name, the file will compile. |
void |
testCompileClasspathOKDifferentPackages()
Test that one compiled file can depend on the other. |
void |
testCompileMissingCloseSquiggly()
Tests compiling an invalid file and checks to make sure the class file was not created. |
void |
testCompilePackageAsField()
Creates a source file with "package" as a field name and ensures that compile starts but fails due to the invalid field name. |
void |
testCompilePackageAsField2()
Creates a source file with "package" as a field name and ensures that compile starts but fails due to the invalid field name. |
void |
testCompileReferenceToNonPublicClass()
Tests a compile on a file that references a non-public class defined in another class with a name different than the non-public class |
void |
testCompileWithJavaAssert()
Test support for assert keyword if enabled. |
void |
testCompileWithPackageStatementInsideClass()
Puts an otherwise valid package statement inside a class declaration. |
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
assertCompileErrorsPresent, assertCompileErrorsPresent, assertContents, assertLength, assertModified, assertNumOpenDocs, changeDocumentText, classForJava, createFile, createModel, interpret, interpretIgnoreResult, setUp, setupDocument, tearDown, tempDirectory, tempFile, tempFile, writeToNewTempFile |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final String FOO_MISSING_CLOSE_TEXT
private static final String BAR_MISSING_SEMI_TEXT
private static final String FOO_PACKAGE_AFTER_IMPORT
private static final String FOO_PACKAGE_INSIDE_CLASS
private static final String FOO_PACKAGE_AS_FIELD
private static final String FOO_PACKAGE_AS_FIELD_2
private static final String FOO_PACKAGE_AS_PART_OF_FIELD
private static final String FOO2_EXTENDS_FOO_TEXT
private static final String FOO_NON_PUBLIC_CLASS_TEXT
private static final String FOO2_REFERENCES_NON_PUBLIC_CLASS_TEXT
private static final String FOO_WITH_ASSERT
Constructor Detail |
public GlobalModelCompileTest(String name)
String
- nameMethod Detail |
public static Test suite()
public void runBare() throws Throwable
TestCase.runBare()
to interatively run this
test case for each compiler.
This method is called once per test method, and it magically
invokes the method.runBare
in class TestCase
private String _name()
public void testCompileAllDifferentSourceRoots() throws BadLocationException, IOException, InterruptedException
public void testCompileAllFailsDifferentSourceRoots() throws BadLocationException, IOException
public void testCompileClasspathOKDefaultPackage() throws BadLocationException, IOException, InterruptedException
public void testCompileClasspathOKDifferentPackages() throws BadLocationException, IOException, InterruptedException
public void testCompilePackageAsField() throws BadLocationException, IOException
public void testCompilePackageAsField2() throws BadLocationException, IOException
testCompilePackageAsField()
as it
initializes the field.public void testCompileMissingCloseSquiggly() throws BadLocationException, IOException
public void testCompileWithPackageStatementInsideClass() throws BadLocationException, IOException
public void testCompileAbortsIfUnsaved() throws BadLocationException, IOException
public void testCompileAbortsIfAnyUnsaved() throws BadLocationException, IOException
public void testCompileAnyUnsavedButSaveWhenAsked() throws BadLocationException, IOException, InterruptedException
public void testCompileActiveSavedAnyUnsavedButSaveWhenAsked() throws BadLocationException, IOException, InterruptedException
public void testClassFileSynchronization() throws BadLocationException, IOException, InterruptedException
public void testClassFileSynchronizationAfterRename() throws BadLocationException, IOException, IllegalStateException, InterruptedException
public void testCompileAfterFileMoved() throws BadLocationException, IOException
public void testCompileReferenceToNonPublicClass() throws BadLocationException, IOException, InterruptedException
public void testCompileWithJavaAssert() throws BadLocationException, IOException, InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |