edu.rice.cs.drjava.model.definitions.indent
Class QuestionNewParenPhraseTest

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

public final class QuestionNewParenPhraseTest
extends IndentRulesTestCase

Tests the indention rule which detects whether the current line starts a new parenthesized phrase. (ie. Previous line ends in comma, semicolon, open paren, or open bracket.)

Version:
$Id: QuestionNewParenPhraseTest.java 5175 2010-01-20 08:46:32Z mgricken $

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
QuestionNewParenPhraseTest()
           
 
Method Summary
 void testDoesNotEndWithParenDelim()
          Tests having text on a line after the delimiter.
 void testIgnoreDelimsOnLine()
          Tests ignoring delims on line.
 void testMultipleBlankLinesBack()
          Tests having a paren delimiter several lines back, with only whitespace inbetween.
 void testMultipleCommentLinesBack()
          Tests having a paren delimiter several lines back, with only blank space and comments inbetween.
 void testNoParenDelims()
          Tests having no paren phrase delimiters on prev line.
 void testOperatorDelim()
          Tests having an operator as a delimiter.
 void testParenDelimsNoText()
          Tests having delimiter on prev line, with no text preceding.
 void testParenDelimsWithComment()
          Tests having a comment after the delimiter
 void testParenDelimsWithText()
          Tests having delimiter on prev line, with text preceding.
 void testStartOfDocument()
          Tests hitting start of document.
 
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

QuestionNewParenPhraseTest

public QuestionNewParenPhraseTest()
Method Detail

testStartOfDocument

public void testStartOfDocument()
                         throws javax.swing.text.BadLocationException
Tests hitting start of document.

Throws:
javax.swing.text.BadLocationException

testNoParenDelims

public void testNoParenDelims()
                       throws javax.swing.text.BadLocationException
Tests having no paren phrase delimiters on prev line.

Throws:
javax.swing.text.BadLocationException

testParenDelimsWithText

public void testParenDelimsWithText()
                             throws javax.swing.text.BadLocationException
Tests having delimiter on prev line, with text preceding.

Throws:
javax.swing.text.BadLocationException

testParenDelimsNoText

public void testParenDelimsNoText()
                           throws javax.swing.text.BadLocationException
Tests having delimiter on prev line, with no text preceding.

Throws:
javax.swing.text.BadLocationException

testParenDelimsWithComment

public void testParenDelimsWithComment()
                                throws javax.swing.text.BadLocationException
Tests having a comment after the delimiter

Throws:
javax.swing.text.BadLocationException

testMultipleBlankLinesBack

public void testMultipleBlankLinesBack()
                                throws javax.swing.text.BadLocationException
Tests having a paren delimiter several lines back, with only whitespace inbetween.

Throws:
javax.swing.text.BadLocationException

testMultipleCommentLinesBack

public void testMultipleCommentLinesBack()
                                  throws javax.swing.text.BadLocationException
Tests having a paren delimiter several lines back, with only blank space and comments inbetween.

Throws:
javax.swing.text.BadLocationException

testDoesNotEndWithParenDelim

public void testDoesNotEndWithParenDelim()
                                  throws javax.swing.text.BadLocationException
Tests having text on a line after the delimiter.

Throws:
javax.swing.text.BadLocationException

testOperatorDelim

public void testOperatorDelim()
                       throws javax.swing.text.BadLocationException
Tests having an operator as a delimiter.

Throws:
javax.swing.text.BadLocationException

testIgnoreDelimsOnLine

public void testIgnoreDelimsOnLine()
                            throws javax.swing.text.BadLocationException
Tests ignoring delims on line.

Throws:
javax.swing.text.BadLocationException