edu.rice.cs.drjava.model.definitions.reducedmodel
Class MixedQuoteTest
java.lang.Object
|
+--junit.framework.Assert
|
+--junit.framework.TestCase
|
+--edu.rice.cs.drjava.model.definitions.reducedmodel.BraceReductionTestCase
|
+--edu.rice.cs.drjava.model.definitions.reducedmodel.MixedQuoteTest
- All Implemented Interfaces:
- ReducedModelStates, Test
- public class MixedQuoteTest
- extends BraceReductionTestCase
- implements ReducedModelStates
Tests the interaction between double and single quotes.
- Version:
- $Id: MixedQuoteTest.java,v 1.6 2002/02/08 14:22:21 brianstoler Exp $
Method Summary |
protected void |
insertGap(BraceReduction model,
int size)
Convenience function to insert a number of non-special characters into a reduced model. |
protected void |
setUp()
Initializes the reduced models used in the tests. |
static Test |
suite()
Creates a test suite for JUnit to use. |
void |
testDoubleEclipsesSingle()
Tests how a double quote can eclipse the effects of a single quote by inserting
the double quote before the single quote. |
void |
testSingleEclipsesDouble()
Tests how a single quote can eclipse the effects of a double quote by inserting
the single quote before the double quote. |
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 |
model
protected ReducedModelControl model
MixedQuoteTest
public MixedQuoteTest(String name)
- Constructor.
- Parameters:
name
- a name for the test.
setUp
protected void setUp()
- Initializes the reduced models used in the tests.
- Overrides:
setUp
in class TestCase
suite
public static Test suite()
- Creates a test suite for JUnit to use.
- Returns:
- a test suite for JUnit
insertGap
protected void insertGap(BraceReduction model,
int size)
- Convenience function to insert a number of non-special characters into a reduced model.
- Parameters:
model
- the model being modifiedsize
- the number of characters being inserted
testSingleEclipsesDouble
public void testSingleEclipsesDouble()
- Tests how a single quote can eclipse the effects of a double quote by inserting
the single quote before the double quote. This test caught an error with
getStateAtCurrent(): the check for double quote status checks if there is a double
quote immediately preceding, but it didn't make sure the double quote was FREE.
I fixed that, so now the test passes.
testDoubleEclipsesSingle
public void testDoubleEclipsesSingle()
- Tests how a double quote can eclipse the effects of a single quote by inserting
the double quote before the single quote.