|
||||||||||
| 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.GlobalModelCompileErrorsTest
public final class GlobalModelCompileErrorsTest
Tests to ensure that compilation fails when expected, and that the errors are reported correctly. Every test in this class is run for *each* of the compilers that is available.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class junit.framework.TestCase |
|---|
TestCase.WrappedException |
| Field Summary | |
|---|---|
private static java.lang.String |
BAR_MISSING_SEMI_TEXT
|
private static java.lang.String |
BAR_MISSING_SEMI_TEXT_MULTIPLE_LINES
|
protected static java.lang.String |
COMPILER_ERRORS_2872797_TEXT
|
private static java.lang.String |
FOO_MISSING_CLOSE_TEXT
|
private static java.lang.String |
FOO_PACKAGE_AFTER_IMPORT
|
private static java.lang.String |
FOO_PACKAGE_AS_FIELD
|
private static java.lang.String |
FOO_PACKAGE_AS_FIELD_2
|
private static java.lang.String |
FOO_PACKAGE_INSIDE_CLASS
|
| Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
|---|
_doc, _interactionsController, _log, _model, _tempDir, BAR_TEXT, BAZ_TEXT, FOO_PACKAGE_AS_PART_OF_FIELD, FOO_TEXT |
| Fields inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase |
|---|
_testFailed |
| Constructor Summary | |
|---|---|
GlobalModelCompileErrorsTest()
|
|
| Method Summary | |
|---|---|
private java.lang.String |
_name()
Gets the name of the compiler. |
void |
testCompileAllFailsDifferentSourceRoots()
Tests calling compileAll with different source roots works if the files have errors in them. |
void |
testCompileEndWhileParsing()
Tests compiling an invalid file and checks to make sure the class file was not created. |
void |
testCompileFailsCorrectLineNumbers()
Tests the compiler errors have the correct line numbers. |
void |
testCompileMissingCloseCurly()
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 |
testCompileWithPackageStatementInsideClass()
Puts an otherwise valid package statement inside a class declaration. |
| 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 |
|---|
private static final java.lang.String FOO_MISSING_CLOSE_TEXT
private static final java.lang.String BAR_MISSING_SEMI_TEXT
private static final java.lang.String FOO_PACKAGE_AFTER_IMPORT
private static final java.lang.String FOO_PACKAGE_INSIDE_CLASS
private static final java.lang.String FOO_PACKAGE_AS_FIELD
private static final java.lang.String FOO_PACKAGE_AS_FIELD_2
private static final java.lang.String BAR_MISSING_SEMI_TEXT_MULTIPLE_LINES
protected static final java.lang.String COMPILER_ERRORS_2872797_TEXT
| Constructor Detail |
|---|
public GlobalModelCompileErrorsTest()
| Method Detail |
|---|
private java.lang.String _name()
public void testCompileAllFailsDifferentSourceRoots()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
public void testCompilePackageAsField()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
public void testCompilePackageAsField2()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
testCompilePackageAsField() as it initializes the field.
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
public void testCompileMissingCloseCurly()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
public void testCompileWithPackageStatementInsideClass()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
public void testCompileFailsCorrectLineNumbers()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
public void testCompileEndWhileParsing()
throws javax.swing.text.BadLocationException,
java.io.IOException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||