|
||||||||||
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.GlobalIndentTest
Tests the indenting functionality on the level of the GlobalModel. Not only are we testing that the document turns out right, but also that the cursor position in the document is consistent with a standard.
Field Summary | |
private static String |
BAR_CALL_1
|
private static String |
BAR_CALL_2
|
private static String |
BEAT_1
|
private static String |
BEAT_2
|
private static String |
FOO_EX_1
|
private static String |
FOO_EX_2
|
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
_model, _originalModel, _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 |
Fields inherited from class junit.framework.TestCase |
fName |
Constructor Summary | |
GlobalIndentTest(String name)
put your documentation comment here |
Method Summary | |
private void |
_assertContents(String expected,
Document document)
|
private void |
_assertLocation(int loc,
OpenDefinitionsDocument openDoc)
|
private void |
_assertNumOpenDocs(int num)
|
private OpenDefinitionsDocument |
_getOpenDoc()
Get the only open definitions document. |
static Test |
suite()
put your documentation comment here |
void |
testIndentDoesNothing()
Indent does nothing to change the document when everything is in place. |
void |
testIndentGrowTabAtEnd()
Tests indent that increases the size of the tab when the cursor is at the end of the line. |
void |
testIndentGrowTabAtMiddle()
Tests indent that increases the size of the tab when the cursor is in the middle of the line. |
void |
testIndentGrowTabAtStart()
Tests indent that increases the size of the tab when the cursor is at the start of the line. |
void |
testIndentInsideParenAtEnd()
Do an indent that follows the behavior in line with parentheses. |
void |
testIndentInsideParenAtStart()
Do an indent that follows the behavior in line with parentheses. |
void |
testIndentSameAsLineAboveAtEnd()
Do an indent that should match up with the indent on the line above. |
void |
testIndentSameAsLineAboveAtStart()
Do an indent that should match up with the indent on the line above. |
void |
testIndentShrinkTabAtEnd()
Tests indent that increases the size of the tab when the cursor is at the end of the line. |
void |
testIndentShrinkTabAtMiddle()
Tests indent that increases the size of the tab when the cursor is in the middle of the line. |
void |
testIndentShrinkTabAtStart()
Tests indent that increases the size of the tab when the cursor is at the start of the line. |
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, runBare, 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_EX_1
private static final String FOO_EX_2
private static final String BAR_CALL_1
private static final String BAR_CALL_2
private static final String BEAT_1
private static final String BEAT_2
Constructor Detail |
public GlobalIndentTest(String name)
String
- nameMethod Detail |
public static Test suite()
public void testIndentGrowTabAtStart() throws BadLocationException
BadLocationException
- public void testIndentGrowTabAtMiddle() throws BadLocationException
BadLocationException
- public void testIndentGrowTabAtEnd() throws BadLocationException
BadLocationException
- public void testIndentShrinkTabAtStart() throws BadLocationException
BadLocationException
- public void testIndentShrinkTabAtMiddle() throws BadLocationException
BadLocationException
- public void testIndentShrinkTabAtEnd() throws BadLocationException
BadLocationException
- public void testIndentSameAsLineAboveAtStart() throws BadLocationException
BadLocationException
- public void testIndentSameAsLineAboveAtEnd() throws BadLocationException
BadLocationException
- public void testIndentInsideParenAtStart() throws BadLocationException
BadLocationException
- public void testIndentInsideParenAtEnd() throws BadLocationException
BadLocationException
- public void testIndentDoesNothing() throws BadLocationException
private OpenDefinitionsDocument _getOpenDoc()
private void _assertNumOpenDocs(int num)
private void _assertContents(String expected, Document document) throws BadLocationException
private void _assertLocation(int loc, OpenDefinitionsDocument openDoc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |