org.antlr.test
Class TestIntervalSet

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.antlr.test.BaseTest
              extended by org.antlr.test.TestIntervalSet
All Implemented Interfaces:
junit.framework.Test

public class TestIntervalSet
extends BaseTest


Nested Class Summary
 
Nested classes/interfaces inherited from class org.antlr.test.BaseTest
BaseTest.StreamVacuum
 
Field Summary
 
Fields inherited from class org.antlr.test.BaseTest
CLASSPATH, jikes, pathSep, stderr, tmpdir
 
Constructor Summary
TestIntervalSet()
          Public default constructor used by TestRig
 
Method Summary
 void testComplement()
           
 void testComplement2()
           
 void testComplement3()
           
 void testEmptyIntersection()
           
 void testEmptyIntersectionSingleElements()
           
 void testEquals()
           
 void testIntersectionWithTwoContainedElements()
           
 void testIntersectionWithTwoContainedElementsReversed()
           
 void testIsolatedElements()
           
 void testMembership()
           
 void testMergeOfRangesAndSingleValues()
           
 void testMergeOfRangesAndSingleValuesReverse()
           
 void testMergeWhereAdditionMergesTwoExistingIntervals()
           
 void testMergeWithDoubleOverlap()
           
 void testMixedRangesAndElements()
           
 void testNotEqualSet()
           
 void testNotRIntersectionNotT()
          The following was broken: {''..'s', 'u'..'?'} & {''..'q', 's'..'?'}= {''..'q', 's'}!!!! broken...
 void testNotSet()
           
 void testNotSetEdgeElement()
           
 void testNotSetFragmentedVocabulary()
           
 void testNotSingleElement()
           
 void testRangeAndIsolatedElement()
           
 void testSimpleAnd()
           
 void testSimpleEquals()
           
 void testSingleElement()
           
 void testSingleElementMinusDisjointSet()
           
 void testSize()
           
 void testSubtractOfCompletelyContainedRange()
           
 void testSubtractOfCompletelyCoveredRange()
           
 void testSubtractOfOverlappingRangeFromLeft()
           
 void testSubtractOfOverlappingRangeFromRight()
           
 void testSubtractOfRangeSpanningMultipleRanges()
           
 void testSubtractOfWackyRange()
          The following was broken: {0..113, 115..65534}-{0..115, 117..65534}=116..65534
 void testToList()
           
 
Methods inherited from class org.antlr.test.BaseTest
antlr, compile, eraseFiles, execParser, execTreeParser, execTreeParser, getFirstLineOfException, mkdir, newTool, rawExecRecognizer, rawGenerateAndBuildRecognizer, writeFile, writeTemplateTestFile, writeTestFile, writeTreeTestFile
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestIntervalSet

public TestIntervalSet()
Public default constructor used by TestRig

Method Detail

testSingleElement

public void testSingleElement()
                       throws java.lang.Exception
Throws:
java.lang.Exception

testIsolatedElements

public void testIsolatedElements()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testMixedRangesAndElements

public void testMixedRangesAndElements()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleAnd

public void testSimpleAnd()
                   throws java.lang.Exception
Throws:
java.lang.Exception

testRangeAndIsolatedElement

public void testRangeAndIsolatedElement()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testEmptyIntersection

public void testEmptyIntersection()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testEmptyIntersectionSingleElements

public void testEmptyIntersectionSingleElements()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

testNotSingleElement

public void testNotSingleElement()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testNotSet

public void testNotSet()
                throws java.lang.Exception
Throws:
java.lang.Exception

testNotEqualSet

public void testNotEqualSet()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testNotSetEdgeElement

public void testNotSetEdgeElement()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testNotSetFragmentedVocabulary

public void testNotSetFragmentedVocabulary()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

testSubtractOfCompletelyContainedRange

public void testSubtractOfCompletelyContainedRange()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

testSubtractOfOverlappingRangeFromLeft

public void testSubtractOfOverlappingRangeFromLeft()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

testSubtractOfOverlappingRangeFromRight

public void testSubtractOfOverlappingRangeFromRight()
                                             throws java.lang.Exception
Throws:
java.lang.Exception

testSubtractOfCompletelyCoveredRange

public void testSubtractOfCompletelyCoveredRange()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testSubtractOfRangeSpanningMultipleRanges

public void testSubtractOfRangeSpanningMultipleRanges()
                                               throws java.lang.Exception
Throws:
java.lang.Exception

testSubtractOfWackyRange

public void testSubtractOfWackyRange()
                              throws java.lang.Exception
The following was broken: {0..113, 115..65534}-{0..115, 117..65534}=116..65534

Throws:
java.lang.Exception

testSimpleEquals

public void testSimpleEquals()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testEquals

public void testEquals()
                throws java.lang.Exception
Throws:
java.lang.Exception

testSingleElementMinusDisjointSet

public void testSingleElementMinusDisjointSet()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testMembership

public void testMembership()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testIntersectionWithTwoContainedElements

public void testIntersectionWithTwoContainedElements()
                                              throws java.lang.Exception
Throws:
java.lang.Exception

testIntersectionWithTwoContainedElementsReversed

public void testIntersectionWithTwoContainedElementsReversed()
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

testComplement

public void testComplement()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testComplement2

public void testComplement2()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testComplement3

public void testComplement3()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testMergeOfRangesAndSingleValues

public void testMergeOfRangesAndSingleValues()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testMergeOfRangesAndSingleValuesReverse

public void testMergeOfRangesAndSingleValuesReverse()
                                             throws java.lang.Exception
Throws:
java.lang.Exception

testMergeWhereAdditionMergesTwoExistingIntervals

public void testMergeWhereAdditionMergesTwoExistingIntervals()
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

testMergeWithDoubleOverlap

public void testMergeWithDoubleOverlap()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testSize

public void testSize()
              throws java.lang.Exception
Throws:
java.lang.Exception

testToList

public void testToList()
                throws java.lang.Exception
Throws:
java.lang.Exception

testNotRIntersectionNotT

public void testNotRIntersectionNotT()
                              throws java.lang.Exception
The following was broken: {''..'s', 'u'..'?'} & {''..'q', 's'..'?'}= {''..'q', 's'}!!!! broken... 'q' is 113 ascii 'u' is 117

Throws:
java.lang.Exception