|
||||||||||
| 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.GlobalIndentTest
public final class 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class junit.framework.TestCase |
|---|
TestCase.WrappedException |
| Field Summary | |
|---|---|
private static java.lang.String |
BAR_CALL_1
|
private static java.lang.String |
BAR_CALL_2
|
private static java.lang.String |
FOO_EX_1
|
private static java.lang.String |
FOO_EX_2
|
| Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
|---|
_doc, _interactionsController, _log, _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 |
| Fields inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase |
|---|
_testFailed |
| Constructor Summary | |
|---|---|
GlobalIndentTest()
|
|
| Method Summary | |
|---|---|
private void |
_assertContents(java.lang.String expected,
OpenDefinitionsDocument document)
|
private void |
_assertLocation(int loc,
OpenDefinitionsDocument openDoc)
|
private void |
_assertNumOpenDocs(int num)
|
private OpenDefinitionsDocument |
_getOpenDoc()
Get the only open definitions document. |
void |
testIndentDoesNothing()
Indent does nothing to change the document when everything is in place. |
void |
testIndentGrowTabAtEnd()
Tests that an indent 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 that an indent 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()
Tests that an indent matches up with the indent on the line above. |
void |
testIndentSameAsLineAboveAtStart()
Tests that an indent matches up with the indent on the line above. |
void |
testIndentShrinkTabAtEnd()
Tests that an indent increases the size of the tab when the cursor is at the end of the line. |
void |
testIndentShrinkTabAtMiddle()
Tests that an indent increases the size of the tab when the cursor is in the middle of the line. |
void |
testIndentShrinkTabAtStart()
Tests that an indent 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.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_EX_1
private static final java.lang.String FOO_EX_2
private static final java.lang.String BAR_CALL_1
private static final java.lang.String BAR_CALL_2
| Constructor Detail |
|---|
public GlobalIndentTest()
| Method Detail |
|---|
public void testIndentGrowTabAtStart()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentGrowTabAtMiddle()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentGrowTabAtEnd()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentShrinkTabAtStart()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentShrinkTabAtMiddle()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentShrinkTabAtEnd()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentSameAsLineAboveAtStart()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentSameAsLineAboveAtEnd()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentInsideParenAtStart()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentInsideParenAtEnd()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledException
public void testIndentDoesNothing()
throws javax.swing.text.BadLocationException,
OperationCanceledException
javax.swing.text.BadLocationException
OperationCanceledExceptionprivate OpenDefinitionsDocument _getOpenDoc()
private void _assertNumOpenDocs(int num)
private void _assertContents(java.lang.String expected,
OpenDefinitionsDocument document)
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
private void _assertLocation(int loc,
OpenDefinitionsDocument openDoc)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||