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

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.IndentTest
All Implemented Interfaces:
Test

public final class IndentTest
extends DrJavaTestCase

Class that tests the tab/enter/curly indenting functionality.

Version:
$Id: IndentTest.java 4691 2008-12-02 23:33:27Z dlsmith $

Field Summary
protected  DefinitionsDocument _doc
           
 
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase
TEST_DRJAVA_CONFIG_PROPERTY
 
Constructor Summary
IndentTest(String name)
          Standard constructor for IdentTest
 
Method Summary
 void setUp()
          Sets up the member bindings common to all tests.
static Test suite()
          Builds the suite of tests for Indent.class.
 void testAfterBlockComment()
          Tests block comment indenting.
 void testAfterBlockComment2()
          put your documentation comment here
 void testAfterBlockComment3()
          put your documentation comment here
 void testAfterBlockComment4()
          put your documentation comment here
 void testAnnotationsAfterDefinition()
          Tests that annotations do not change the indent level of the lines following.
 void testAnnotationsAfterOpenCurly()
          Tests that annotations do not change the indent level of the lines following.
 void testAnonymousInnerClass()
          Regression test for arrays.
 void testBlockIndent()
          put your documentation comment here
 void testBlockIndent2()
          Regression test for bug in drjava-20010802-1020: Indent block on a file containing just " x;\n y;\n" would throw an exception.
 void testCurlyAlignment()
          put your documentation comment here
 void testEndBrace()
          put your documentation comment here
 void testEndOfBlockComment()
          Tests block comment indenting.
 void testEnter()
          put your documentation comment here
 void testEnter2()
          put your documentation comment here
 void testFor()
          put your documentation comment here
 void testFor2()
          put your documentation comment here
 void testIgnoreBraceOnSameLine()
          put your documentation comment here
 void testIndentArray()
          Regression test for arrays.
 void testIndentBraces()
          Regression test for braces.
 void testIndentComments()
          Regression test for comment portion of indent tree.
 void testIndentCommonCases()
          Regression test for common cases.
 void testIndentInfoBracket()
          put your documentation comment here
 void testIndentInfoCurly()
          Tests getLineEnclosingBrace, getEnclosingBrace
 void testIndentInfoParen()
          put your documentation comment here
 void testIndentInfoPrevNewline()
          Put your documentation comment here
 void testIndentingCorrectLine()
           
 void testIndentInsideCommentBlock()
          put your documentation comment here
 void testIndentParenPhrases()
          Regression test for paren phrases.
 void testIndentSwitch()
          Regression test for switch statements.
 void testIndentTernary()
          Regression test for ternary operators.
 void testInsideClass()
          put your documentation comment here
 void testInsideClassWithBraceSets()
          put your documentation comment here
 void testLiveUpdateOfIndentLevel()
           
 void testMotion()
          put your documentation comment here
 void testMultiLineStarInsertFirstLine()
          Test case for SourceForge bug# 681203.
 void testMultiLineStarInsertLaterLine()
          Test case for SourceForge bug# 681203.
 void testNestedIfInSwitch()
          tests that an if statment nested in a switch will be indented properly
 void testNextCharIsNewline()
          put your documentation comment here
 void testNoParameters()
           
 void testNotRecognizeComments()
          put your documentation comment here
 void testNotRecognizeComments2()
          put your documentation comment here
 void testOpenBracket()
          put your documentation comment here
 void testOpenParen()
          put your documentation comment here
 void testParenthesizedAnonymousInnerClass()
           
 void testPrintString()
          put your documentation comment here
 void testSecondLineProblem()
          put your documentation comment here
 void testSecondLineProblem2()
          put your documentation comment here
 void testSmallFileProblem()
          put your documentation comment here
 void testSpaceBrace()
          put your documentation comment here
 void testStartBrace()
          put your documentation comment here
 void testStartSimple()
          put your documentation comment here
 void testStartSpaceIndent()
          put your documentation comment here
 void testWeird()
          put your documentation comment here
 void testWierd2()
          put your documentation comment here
 
Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase
setConfigSetting, setDocText, tearDown
 
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

_doc

protected DefinitionsDocument _doc
Constructor Detail

IndentTest

public IndentTest(String name)
Standard constructor for IdentTest

Parameters:
name -
Method Detail

setUp

public void setUp()
           throws Exception
Sets up the member bindings common to all tests.

Overrides:
setUp in class DrJavaTestCase
Throws:
Exception - This convention is mandated by JUnit.TestCase, the superclass of this class.

suite

public static Test suite()
Builds the suite of tests for Indent.class.

Returns:
the suite.

testIndentComments

public void testIndentComments()
                        throws BadLocationException
Regression test for comment portion of indent tree.

Throws:
BadLocationException

testMultiLineStarInsertFirstLine

public void testMultiLineStarInsertFirstLine()
                                      throws BadLocationException
Test case for SourceForge bug# 681203.

Throws:
BadLocationException

testMultiLineStarInsertLaterLine

public void testMultiLineStarInsertLaterLine()
                                      throws BadLocationException
Test case for SourceForge bug# 681203.

Throws:
BadLocationException

testIndentParenPhrases

public void testIndentParenPhrases()
                            throws BadLocationException
Regression test for paren phrases.

Throws:
BadLocationException

testIndentBraces

public void testIndentBraces()
                      throws BadLocationException
Regression test for braces.

Throws:
BadLocationException

testIndentArray

public void testIndentArray()
                     throws BadLocationException
Regression test for arrays.

Throws:
BadLocationException

testIndentCommonCases

public void testIndentCommonCases()
                           throws BadLocationException
Regression test for common cases.

Throws:
BadLocationException

testIndentSwitch

public void testIndentSwitch()
                      throws BadLocationException
Regression test for switch statements.

Throws:
BadLocationException

testIndentTernary

public void testIndentTernary()
                       throws BadLocationException
Regression test for ternary operators.

Throws:
BadLocationException

testIndentInfoCurly

public void testIndentInfoCurly()
                         throws BadLocationException
Tests getLineEnclosingBrace, getEnclosingBrace

Throws:
BadLocationException

testIndentInfoParen

public void testIndentInfoParen()
                         throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testIndentInfoBracket

public void testIndentInfoBracket()
                           throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testIndentInfoPrevNewline

public void testIndentInfoPrevNewline()
                               throws BadLocationException
Put your documentation comment here

Throws:
BadLocationException

testEndOfBlockComment

public void testEndOfBlockComment()
                           throws BadLocationException
Tests block comment indenting.

Throws:
BadLocationException

testAfterBlockComment

public void testAfterBlockComment()
                           throws BadLocationException
Tests block comment indenting.

Throws:
BadLocationException

testAfterBlockComment3

public void testAfterBlockComment3()
                            throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testAfterBlockComment4

public void testAfterBlockComment4()
                            throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testAfterBlockComment2

public void testAfterBlockComment2()
                            throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testStartSimple

public void testStartSimple()
                     throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testStartSpaceIndent

public void testStartSpaceIndent()
                          throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testStartBrace

public void testStartBrace()
                    throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testEndBrace

public void testEndBrace()
                  throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testInsideClass

public void testInsideClass()
                     throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testInsideClassWithBraceSets

public void testInsideClassWithBraceSets()
                                  throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testIgnoreBraceOnSameLine

public void testIgnoreBraceOnSameLine()
                               throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testWeird

public void testWeird()
               throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testWierd2

public void testWierd2()
                throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testMotion

public void testMotion()
                throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testNextCharIsNewline

public void testNextCharIsNewline()
                           throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testFor

public void testFor()
             throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testFor2

public void testFor2()
              throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testOpenParen

public void testOpenParen()
                   throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testPrintString

public void testPrintString()
                     throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testOpenBracket

public void testOpenBracket()
                     throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testCurlyAlignment

public void testCurlyAlignment()
                        throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testSpaceBrace

public void testSpaceBrace()
                    throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testEnter

public void testEnter()
               throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testEnter2

public void testEnter2()
                throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testNotRecognizeComments

public void testNotRecognizeComments()
                              throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testNotRecognizeComments2

public void testNotRecognizeComments2()
                               throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testBlockIndent

public void testBlockIndent()
                     throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testBlockIndent2

public void testBlockIndent2()
                      throws BadLocationException
Regression test for bug in drjava-20010802-1020: Indent block on a file containing just " x;\n y;\n" would throw an exception.

Throws:
BadLocationException

testIndentInsideCommentBlock

public void testIndentInsideCommentBlock()
                                  throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testSecondLineProblem

public void testSecondLineProblem()
                           throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testSecondLineProblem2

public void testSecondLineProblem2()
                            throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testSmallFileProblem

public void testSmallFileProblem()
                          throws BadLocationException
put your documentation comment here

Throws:
BadLocationException

testAnonymousInnerClass

public void testAnonymousInnerClass()
                             throws BadLocationException
Regression test for arrays.

Throws:
BadLocationException

testParenthesizedAnonymousInnerClass

public void testParenthesizedAnonymousInnerClass()
                                          throws BadLocationException
Throws:
BadLocationException

testLiveUpdateOfIndentLevel

public void testLiveUpdateOfIndentLevel()
                                 throws BadLocationException
Throws:
BadLocationException

testNestedIfInSwitch

public void testNestedIfInSwitch()
                          throws BadLocationException
tests that an if statment nested in a switch will be indented properly

Throws:
BadLocationException

testIndentingCorrectLine

public void testIndentingCorrectLine()
                              throws BadLocationException
Throws:
BadLocationException

testAnnotationsAfterOpenCurly

public void testAnnotationsAfterOpenCurly()
                                   throws BadLocationException
Tests that annotations do not change the indent level of the lines following.

Throws:
BadLocationException

testAnnotationsAfterDefinition

public void testAnnotationsAfterDefinition()
                                    throws BadLocationException
Tests that annotations do not change the indent level of the lines following.

Throws:
BadLocationException

testNoParameters

public void testNoParameters()
                      throws BadLocationException
Throws:
BadLocationException