|
||||||||||
| 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.definitions.indent.IndentRulesTestCase
edu.rice.cs.drjava.model.definitions.IndentHelperTest
public final class IndentHelperTest
Tests for the helper methods in DefinitionsDocument
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class junit.framework.TestCase |
|---|
TestCase.WrappedException |
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase |
|---|
_doc, TEST_INDENT_LEVEL |
| Constructor Summary | |
|---|---|
IndentHelperTest()
|
|
| Method Summary | |
|---|---|
private int |
_getIndentOfCurrStmt(int pos)
Convenience method that wraps _doc.getIndentOfCurrStmt calls in a read lock. |
private int |
_getLineEndPos(int pos)
Convenience method that wraps _doc.getLineEndPos calls in a read lock. |
private int |
_getLineFirstCharPos(int pos)
Convenience method that wraps _doc.getLineFirstCharPos calls in a read lock. |
private int |
_getLineStartPos(int pos)
Convenience method that wraps _doc.getLineStartPos calls in a read lock. |
private boolean |
_inParenPhrase(int pos)
Convenience method that wraps _doc.inParenPhrase calls in a read lock. |
private int |
findPrevDelimiter(int pos,
char[] delimiters)
Convenience method that wraps _doc.findPrevDelimiter calls in a read lock. |
private int |
getFirstNonWSCharPos(int pos)
Convenience method that wraps _doc.getFirstNonWSCharPos calls in a read lock. |
void |
testFindPrevDelimiter()
Tests findPrevDelimiter() |
void |
testGetFirstNonWSCharPos()
|
void |
testGetIndentOfCurrStmtDelimiters()
|
void |
testGetIndentOfCurrStmtDelimiterSameLine()
|
void |
testGetIndentOfCurrStmtEndOfDoc()
|
void |
testGetIndentOfCurrStmtIgnoreDelimsInParenPhrase()
|
void |
testGetIndentOfCurrStmtMultipleLines()
|
void |
testGetIntelligentBeginLinePos()
Tests that the "intelligent" beginning of line can be found, given a position on the line. |
void |
testGetLineEndPos()
|
void |
testGetLineFirstCharPos()
|
void |
testGetLineStartPos()
|
void |
testPosInParenPhrase()
|
| Methods inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase |
|---|
_assertContents, _setDocText, setUp, tearDown |
| 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 |
| Constructor Detail |
|---|
public IndentHelperTest()
| Method Detail |
|---|
private int findPrevDelimiter(int pos,
char[] delimiters)
throws BadLocationException
BadLocationException
private boolean _inParenPhrase(int pos)
throws BadLocationException
BadLocationException
private int _getIndentOfCurrStmt(int pos)
throws BadLocationException
BadLocationException
private int _getLineStartPos(int pos)
throws BadLocationException
BadLocationException
private int _getLineEndPos(int pos)
throws BadLocationException
BadLocationException
private int _getLineFirstCharPos(int pos)
throws BadLocationException
BadLocationException
private int getFirstNonWSCharPos(int pos)
throws BadLocationException
BadLocationException
public void testFindPrevDelimiter()
throws BadLocationException
BadLocationException
public void testPosInParenPhrase()
throws BadLocationException
BadLocationException
public void testGetIndentOfCurrStmtDelimiters()
throws BadLocationException
BadLocationException
public void testGetIndentOfCurrStmtDelimiterSameLine()
throws BadLocationException
BadLocationException
public void testGetIndentOfCurrStmtMultipleLines()
throws BadLocationException
BadLocationException
public void testGetIndentOfCurrStmtIgnoreDelimsInParenPhrase()
throws BadLocationException
BadLocationException
public void testGetIndentOfCurrStmtEndOfDoc()
throws BadLocationException
BadLocationException
public void testGetLineStartPos()
throws BadLocationException
BadLocationException
public void testGetLineEndPos()
throws BadLocationException
BadLocationException
public void testGetLineFirstCharPos()
throws BadLocationException
BadLocationException
public void testGetFirstNonWSCharPos()
throws BadLocationException
BadLocationException
public void testGetIntelligentBeginLinePos()
throws BadLocationException
BadLocationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||