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

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
                    |
                    +--edu.rice.cs.drjava.model.definitions.indent.QuestionStartingNewStmtTest
All Implemented Interfaces:
Test

public class QuestionStartingNewStmtTest
extends IndentRulesTestCase

Tests the question rule which determines if the current line is starting a new statement.

Version:
$Id: QuestionStartingNewStmtTest.java,v 1.2 2002/03/27 21:50:24 besan Exp $

Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_doc, _indent
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
QuestionStartingNewStmtTest(String name)
          Tests the indentation decision tree.
 
Method Summary
 void testNotStartOfStmtDueToEndCharactersInCommentsOrQuotes()
          Ensures that the current line is the first line of a statement.
 void testStartOfStmtCheckForEndCharacters()
          Ensures that the current line is the first line of a statement.
 void testStartOfStmtIgnoreWhiteSpaceAndCommentsInBetween()
          Ensures that the current line is the first line of a statement.
 
Methods inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_assertContents, _setDocText, setUp
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

QuestionStartingNewStmtTest

public QuestionStartingNewStmtTest(String name)
Tests the indentation decision tree.
Method Detail

testStartOfStmtCheckForEndCharacters

public void testStartOfStmtCheckForEndCharacters()
                                          throws BadLocationException
Ensures that the current line is the first line of a statement. This is done by testing if the previous character is one of the following: docstart, ';', '{', '}' These characters are here-on refered to as 'end-characters'.

testStartOfStmtIgnoreWhiteSpaceAndCommentsInBetween

public void testStartOfStmtIgnoreWhiteSpaceAndCommentsInBetween()
                                                         throws BadLocationException
Ensures that the current line is the first line of a statement. Tests that whitespace, single-line and multi-line comments are ignored when searching for the end-characters.

testNotStartOfStmtDueToEndCharactersInCommentsOrQuotes

public void testNotStartOfStmtDueToEndCharactersInCommentsOrQuotes()
                                                            throws BadLocationException
Ensures that the current line is the first line of a statement. Tests that end characters in single-line comments, multi-line comments or quotes are ignored.