edu.rice.cs.drjava.model.definitions
Class IndentHelperTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.drjava.DrJavaTestCase
              extended by edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
                  extended by edu.rice.cs.drjava.model.definitions.IndentHelperTest
All Implemented Interfaces:
Test

public final class IndentHelperTest
extends IndentRulesTestCase

Tests for the helper methods in DefinitionsDocument

Version:
$Id: IndentHelperTest.java 4653 2008-08-26 14:46:35Z rcartwright $

Field Summary
 
Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_doc, TEST_INDENT_LEVEL
 
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase
TEST_DRJAVA_CONFIG_PROPERTY
 
Constructor Summary
IndentHelperTest()
           
 
Method Summary
 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

IndentHelperTest

public IndentHelperTest()
Method Detail

testFindPrevDelimiter

public void testFindPrevDelimiter()
                           throws BadLocationException
Tests findPrevDelimiter()

Throws:
BadLocationException

testPosInParenPhrase

public void testPosInParenPhrase()
                          throws BadLocationException
Throws:
BadLocationException

testGetIndentOfCurrStmtDelimiters

public void testGetIndentOfCurrStmtDelimiters()
                                       throws BadLocationException
Throws:
BadLocationException

testGetIndentOfCurrStmtDelimiterSameLine

public void testGetIndentOfCurrStmtDelimiterSameLine()
                                              throws BadLocationException
Throws:
BadLocationException

testGetIndentOfCurrStmtMultipleLines

public void testGetIndentOfCurrStmtMultipleLines()
                                          throws BadLocationException
Throws:
BadLocationException

testGetIndentOfCurrStmtIgnoreDelimsInParenPhrase

public void testGetIndentOfCurrStmtIgnoreDelimsInParenPhrase()
                                                      throws BadLocationException
Throws:
BadLocationException

testGetIndentOfCurrStmtEndOfDoc

public void testGetIndentOfCurrStmtEndOfDoc()
                                     throws BadLocationException
Throws:
BadLocationException

testGetLineStartPos

public void testGetLineStartPos()
                         throws BadLocationException
Throws:
BadLocationException

testGetLineEndPos

public void testGetLineEndPos()
                       throws BadLocationException
Throws:
BadLocationException

testGetLineFirstCharPos

public void testGetLineFirstCharPos()
                             throws BadLocationException
Throws:
BadLocationException

testGetFirstNonWSCharPos

public void testGetFirstNonWSCharPos()
                              throws BadLocationException
Throws:
BadLocationException

testGetIntelligentBeginLinePos

public void testGetIntelligentBeginLinePos()
                                    throws BadLocationException
Tests that the "intelligent" beginning of line can be found, given a position on the line. Very similar to getFirstNonWSCharPos, except that comments are treated as non-whitespace, and less parsing needs to be done.

Throws:
BadLocationException