|
||||||||||
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.definitions.DefinitionsDocumentTest
Tests the functionality of the definitions document.
Field Summary | |
protected DefinitionsDocument |
defModel
|
Fields inherited from class junit.framework.TestCase |
fName |
Fields inherited from interface edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates |
FREE, INSIDE_BLOCK_COMMENT, INSIDE_DOUBLE_QUOTE, INSIDE_LINE_COMMENT, INSIDE_SINGLE_QUOTE, STUTTER |
Constructor Summary | |
DefinitionsDocumentTest(String name)
Constructor. |
Method Summary | |
private void |
_checkHighlightStatusConsistent(gj.util.Vector v,
int start,
int end)
Make sure the vector is consistent: all elements immediately adjoin one another (no overlap), and make sure all indices between start and end are in the vector. |
private String |
_getAllText()
|
protected void |
setUp()
Create a definitions document to work with. |
static Test |
suite()
Create a test suite for JUnit to run. |
void |
testDeleteDoc()
Test removal of text. |
void |
testGetColumn1()
Tests returning the current column in the document. |
void |
testGetColumn2()
Tests returning the current column in the document. |
void |
testGetLine1()
Test returning second line in a two-line document. |
void |
testGetLine2()
Test going to a specific line. |
void |
testGetLine3()
Test going to the fourth line in a four line document. |
void |
testGetLine4()
Test going to a line beyond the number of lines in a document just goes to the end of the file. |
void |
testGetLine5()
Test going to the first line of an empty document doesn't do anything funny. |
void |
testGetLine6()
Test going to a line that is greater than the line count of an empty document just keeps you in your current location. |
void |
testGetLine7()
Test that going to a line within the document's line count sets the current position to the first character of the line. |
void |
testGetLineDeleteText()
|
void |
testGetPackageNameWithPackageStatementAfterImport()
Puts an otherwise valid package statement after a valid import declaration. |
void |
testGotoLine1()
Test going to the second line in a two-line document. |
void |
testGotoLine2()
Test going to a specific line. |
void |
testGotoLine3()
Test going to the fourth line in a four line document. |
void |
testGotoLine4()
Test going to a line beyond the number of lines in a document just goes to the end of the file. |
void |
testGotoLine5()
Test going to the first line of an empty document doesn't do anything funny. |
void |
testGotoLine6()
Test going to a line that is greater than the line count of an empty document just keeps you in your current location. |
void |
testGotoLine7()
Test that going to a line within the document's line count sets the current position to the first character of the line. |
void |
testHighlightKeywords1()
Test that keywords are highlighted properly. |
void |
testHighlightKeywords2()
This test case simulates what happens when some text is selected and there is a keyword around too. |
void |
testInsertSlashIntoStarSlash()
Test inserting a slash between a star-slash combo. |
void |
testInsertStarIntoSlashStar()
Test inserting a star between a slash-star combo. |
void |
testInsertStarIntoStarSlash()
Test inserting a star between a star-slash combo. |
void |
testInsertToDoc()
Test insertion. |
void |
testPackageNameEmpty()
Test package-finding on empty document. |
void |
testPackageNameSimple()
Test package-finding on simple document, with no funny comments. |
void |
testPackageNameWeird1()
Test package-finding on document with a block comment between parts of package. |
void |
testPackageNameWeird2()
Test package-finding on document with a line comment between parts of package. |
void |
testQualifiedClassNameWithoutPackage()
Tests that the correct qualified class name is returned without a package. |
void |
testQualifiedClassNameWithPackage()
Tests that the correct qualified class name is returned with a package. |
void |
testRemoveTabs1()
Test whether removeTabs actually removes all tabs. |
void |
testRemoveTabs2()
As of drjava-20020122-1534, files with tabs ended up garbled, with some of the text jumbled all around (bug #506630). |
void |
testTabRemovalOnInsertString()
Test whether tabs are removed as appropriate on call to insertString. |
void |
testTabRemovalOnInsertString2()
Test whether tabs are removed as appropriate on call to insertString. |
void |
testTopLevelClassName()
Test class name-finding on document |
void |
testTopLevelClassNameMisleading()
Test class name-finding on document |
void |
testTopLevelClassNameWComments()
Test class name-finding on document |
void |
testTopLevelClassNameWithClassloaderImport()
Tests that the word class is not recognized if it is not followed by whitespace. |
void |
testTopLevelClassNameWithDelimiters()
Test class name-finding on document |
void |
testTopLevelEnclosingClassName()
Tests that the name of a top level enclosing class can be found. |
void |
testTopLevelInterfaceName()
Test interface name-finding on document |
void |
testTopLevelInterfaceNameBeforeClassName()
Test class name-finding on document |
void |
testTopLevelInterfaceNameMisleading()
Test class name-finding on document |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, tearDown, 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 |
protected DefinitionsDocument defModel
Constructor Detail |
public DefinitionsDocumentTest(String name)
String
- nameMethod Detail |
protected void setUp()
setUp
in class TestCase
public static Test suite()
public void testInsertToDoc() throws BadLocationException
public void testInsertStarIntoStarSlash() throws BadLocationException
BadLocationException
- public void testInsertSlashIntoStarSlash() throws BadLocationException
BadLocationException
- public void testInsertStarIntoSlashStar() throws BadLocationException
BadLocationException
- public void testDeleteDoc() throws BadLocationException
private void _checkHighlightStatusConsistent(gj.util.Vector v, int start, int end)
public void testHighlightKeywords1() throws BadLocationException
BadLocationException
- public void testHighlightKeywords2() throws BadLocationException
BadLocationException
- public void testGotoLine1() throws BadLocationException
BadLocationException
- public void testGotoLine2() throws BadLocationException
BadLocationException
- public void testGotoLine3() throws BadLocationException
BadLocationException
- public void testGotoLine4() throws BadLocationException
BadLocationException
- public void testGotoLine5()
public void testGotoLine6()
public void testGotoLine7() throws BadLocationException
BadLocationException
- public void testGetColumn1() throws BadLocationException
public void testGetColumn2() throws BadLocationException
public void testGetLine1() throws BadLocationException
BadLocationException
- public void testGetLine2() throws BadLocationException
BadLocationException
- public void testGetLine3() throws BadLocationException
BadLocationException
- public void testGetLine4() throws BadLocationException
BadLocationException
- public void testGetLine5()
public void testGetLine6()
public void testGetLine7() throws BadLocationException
BadLocationException
- public void testGetLineDeleteText() throws BadLocationException
public void testRemoveTabs1()
public void testRemoveTabs2()
public void testTabRemovalOnInsertString2() throws BadLocationException
public void testTabRemovalOnInsertString() throws BadLocationException
public void testPackageNameEmpty() throws BadLocationException, InvalidPackageException
public void testPackageNameSimple() throws BadLocationException, InvalidPackageException
public void testPackageNameWeird1() throws BadLocationException, InvalidPackageException
public void testPackageNameWeird2() throws BadLocationException, InvalidPackageException
public void testGetPackageNameWithPackageStatementAfterImport() throws BadLocationException, InvalidPackageException
private String _getAllText() throws BadLocationException
public void testTopLevelClassName() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelInterfaceName() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelClassNameWComments() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelClassNameWithClassloaderImport() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelClassNameMisleading() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelInterfaceNameMisleading() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelInterfaceNameBeforeClassName() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelClassNameWithDelimiters() throws BadLocationException, ClassNameNotFoundException
public void testTopLevelEnclosingClassName() throws BadLocationException, ClassNameNotFoundException
public void testQualifiedClassNameWithPackage() throws BadLocationException, ClassNameNotFoundException
public void testQualifiedClassNameWithoutPackage() throws BadLocationException, ClassNameNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |