laser.regularlanguage.fsa.test
Class RunnableFSATests<L extends LabelInterface>

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by laser.regularlanguage.fsa.test.FSARelatedTests<L>
              extended by laser.regularlanguage.fsa.test.FSATests<L>
                  extended by laser.regularlanguage.fsa.test.RunnableFSATests<L>
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
StringRunnableDFATests, StringRunnableFSATests

public abstract class RunnableFSATests<L extends LabelInterface>
extends FSATests<L>


Field Summary
protected  java.util.List<L> EMPTY_STRING
           
protected  RunnableFSAInterface<L> forwardsDFABecomesBackwardsNFA_
           
protected  AbstractRunnableFSAFactory<L> fsaFactory_
           
 
Fields inherited from class laser.regularlanguage.fsa.test.FSARelatedTests
emptyDFA_, labelDFA_, labelEpsilonFreeNFA_, starDFA_, starNFA_
 
Constructor Summary
RunnableFSATests()
           
 
Method Summary
protected  AlphabetInterface<L> _createAlphabetInstance()
          Creates a new empty Alphabet.
protected  RunnableFSAInterface<L> _createEmptyDFA()
          Creates an empty DFA.
protected  RunnableFSAInterface<L> _createLabelDFA()
          Creates a label DFA.
protected  RunnableFSAInterface<L> _createLabelEpsilonFreeNFA()
          Creates a label epsilon-free NFA if non-determinism is supported.
protected abstract  AbstractRunnableFSAFactory<L> _createRunnableFSAFactory()
           
protected  RunnableFSAInterface<L> _createStarDFA()
          Creates a star DFA.
protected  RunnableFSAInterface<L> _createStarNFA()
          Creates a star NFA if epsilon transitions are supported.
protected  void _setUp()
           
protected  RunnableFSAInterface<L> getEmptyDFA()
           
protected  RunnableFSAInterface<L> getLabelDFA()
           
protected  RunnableFSAInterface<L> getLabelEpsilonFreeNFA()
           
protected  RunnableFSAInterface<L> getStarDFA()
           
protected  RunnableFSAInterface<L> getStarNFA()
           
 void testGetInitialConfigurationForwardsDFA()
           
 void testGetInitialConfigurationForwardsEpsilonFreeNFA()
           
 void testGetInitialConfigurationForwardsIsCopy()
           
 void testGetInitialConfigurationForwardsNFA()
           
 void testGetMutableFSA()
           
 void testIsAcceptedStringBackwardsEmptyDFA()
           
 void testIsAcceptedStringBackwardsLabelDFA()
           
 void testIsAcceptedStringBackwardsLabelEpsilonFreeNFA()
           
 void testIsAcceptedStringBackwardsStarDFA()
           
 void testIsAcceptedStringBackwardsStarNFA()
           
 void testIsAcceptedStringForwardsEmptyDFA()
           
 void testIsAcceptedStringForwardsLabelDFA()
           
 void testIsAcceptedStringForwardsLabelEpsilonFreeNFA()
           
 void testIsAcceptedStringForwardsStarDFA()
           
 void testIsAcceptedStringForwardsStarNFA()
           
 void testIsFinalConfigurationBackwardsReturnsFalse()
           
 void testIsFinalConfigurationForwardsDFAReturnsFalse()
           
 void testIsFinalConfigurationForwardsDFAReturnTrue()
           
 void testIsFinalConfigurationForwardsEpsilonFreeNFAReturnsFalse()
           
 void testIsFinalConfigurationForwardsNFAReturnsFalse()
           
 void testIsFinalConfigurationsBackwardsReturnsTrue()
           
 void testIsFinalConfigurationsForwardsEpsilonFreeNFAReturnsTrue()
           
 void testIsFinalConfigurationsForwardsNFAReturnsTrue()
           
 void testRunBackwardsOnLabelDFALabelInSigmaReturnsNotEmpty()
           
 void testRunBackwardsOnLabelEpsilonFreeNFALabelInSigmaReturnsNotEmpty()
           
 void testRunBackwardsOnLabelForwardsDFABecomesBackwardsNFA()
           
 void testRunBackwardsOnLabelLabelInSigmaReturnsNotEmptyIsCopy()
           
 void testRunBackwardsOnLabelLabelNotInSigma()
           
 void testRunBackwardsOnLabelNFALabelInSigmaReturnsNotEmpty()
           
 void testRunBackwardsOnLabelNotIsTotalLabelInSigmaReturnsEmpty()
           
 void testRunBackwardsOnLabelNotIsTotalLabelInSigmaReturnsEmptyIsCopy()
           
 void testRunBackwardsOnLabelNullConfiguration()
           
 void testRunBackwardsOnLabelNullLabel()
           
 void testRunBackwardsOnLabelNullState()
           
 void testRunBackwardsOnLabelStateNotInQ()
           
 void testRunBackwardsOnStringLabelNotInSigma()
           
 void testRunBackwardsOnStringNullConfiguration()
           
 void testRunBackwardsOnStringNullLabel()
           
 void testRunBackwardsOnStringNullState()
           
 void testRunBackwardsOnStringStateNotInQ()
           
 void testRunForwardsOnLabelDFALabelInSigmaReturnsNotEmpty()
           
 void testRunForwardsOnLabelEpsilonFreeNFALabelInSigmaReturnsNotEmpty()
           
 void testRunForwardsOnLabelLabelInSigmaReturnsNotEmptyIsCopy()
           
 void testRunForwardsOnLabelLabelNotInSigma()
           
 void testRunForwardsOnLabelNFALabelInSigmaReturnsNotEmpty()
           
 void testRunForwardsOnLabelNotIsTotalLabelInSigmaReturnsEmpty()
           
 void testRunForwardsOnLabelNotIsTotalLabelInSigmaReturnsEmptyIsCopy()
           
 void testRunForwardsOnLabelNullConfiguration()
           
 void testRunForwardsOnLabelNullLabel()
           
 void testRunForwardsOnLabelNullState()
           
 void testRunForwardsOnLabelStateNotInQ()
           
 void testRunForwardsOnStringLabelNotInSigma()
           
 void testRunForwardsOnStringNullConfiguration()
           
 void testRunForwardsOnStringNullLabel()
           
 void testRunForwardsOnStringNullState()
           
 void testRunForwardsOnStringStateNotInQ()
           
 
Methods inherited from class laser.regularlanguage.fsa.test.FSATests
abstractEquals, testCheckWellFormedReturnsNull, testClone, testGetAcceptStatesAndGetNonAcceptStatesAreMutuallyExclusive, testGetAcceptStatesIsCopy, testGetAcceptStatesThenIsAcceptReturnsTrue, testGetAcceptStatesUnionGetNonAcceptStatesIsGetStates, testGetAlphabetIsCopy, testGetDescriptionNotNullIsCopy, testGetEpsilonTransitionNullSource, testGetEpsilonTransitionNullTarget, testGetEpsilonTransitionReturnsNotNull, testGetEpsilonTransitionReturnsNull, testGetEpsilonTransitionSourceNotInQ, testGetEpsilonTransitionTargetNotInQ, testGetLabelTransitionLabelNotInSigma, testGetLabelTransitionNullLabel, testGetLabelTransitionNullSource, testGetLabelTransitionNullTarget, testGetLabelTransitionReturnsNotNull, testGetLabelTransitionReturnsNull, testGetLabelTransitionSourceNotInQ, testGetLabelTransitionTargetNotInQ, testGetNonAcceptStatesIsCopy, testGetNonAcceptStatesThenIsAcceptReturnsFalse, testGetStartStateReturnsNotNull, testGetStatesHaveUniqueIDs, testGetStatesIsCopy, testGetTransitionsHaveUniqueIDs, testGetTransitionsIsCopy, testGetTransitionsNullSource, testGetTransitionsNullTarget, testGetTransitionsReturnsEmpty, testGetTransitionsReturnsEmptyIsCopy, testGetTransitionsReturnsNotEmpty, testGetTransitionsReturnsNotEmptyIsCopy, testGetTransitionsSourceNotInQ, testGetTransitionsTargetNotInQ, testHasEpsilonTransitionsReturnsFalse, testHasEpsilonTransitionsReturnsTrue, testIsDeterministicHasEpsilonReturnsFalse, testIsDeterministicHasNondeterminismReturnsFalse, testIsDeterministicReturnsTrue, testIsTotalReturnsFalse, testIsTotalReturnsTrue, testSetDescriptionNotNull, testSetDescriptionNotNullIsCopy, testSetDescriptionNull, testSetNameNotNull, testSetNameNull
 
Methods inherited from class laser.regularlanguage.fsa.test.FSARelatedTests
checkEmptyDFAPostconditions, checkLabelDFAPostconditions, checkLabelEpsilonFreeNFAPostconditions, checkStarDFAPostconditions, checkStarNFAPostconditions, copyAlphabetInstance, setUp, testCheckEmptyDFAPostconditions, testCheckLabelDFAPostconditions, testCheckLabelEpsilonFreeNFAPostconditions, testCheckStarDFAPostconditions, testCheckStarNFAPostconditions, testDFAInterfaceIsWellDefined
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Field Detail

fsaFactory_

protected AbstractRunnableFSAFactory<L extends LabelInterface> fsaFactory_

forwardsDFABecomesBackwardsNFA_

protected RunnableFSAInterface<L extends LabelInterface> forwardsDFABecomesBackwardsNFA_

EMPTY_STRING

protected final java.util.List<L extends LabelInterface> EMPTY_STRING
Constructor Detail

RunnableFSATests

public RunnableFSATests()
Method Detail

_setUp

protected void _setUp()
               throws java.lang.Exception
Overrides:
_setUp in class FSARelatedTests<L extends LabelInterface>
Throws:
java.lang.Exception

_createEmptyDFA

protected RunnableFSAInterface<L> _createEmptyDFA()
Description copied from class: FSARelatedTests
Creates an empty DFA.

POSTCONDITIONS:

Specified by:
_createEmptyDFA in class FSARelatedTests<L extends LabelInterface>
Returns:
An empty DFA

_createLabelDFA

protected RunnableFSAInterface<L> _createLabelDFA()
Description copied from class: FSARelatedTests
Creates a label DFA.

POSTCONDITIONS:

Specified by:
_createLabelDFA in class FSARelatedTests<L extends LabelInterface>
Returns:
A label DFA

_createLabelEpsilonFreeNFA

protected RunnableFSAInterface<L> _createLabelEpsilonFreeNFA()
Description copied from class: FSARelatedTests
Creates a label epsilon-free NFA if non-determinism is supported.

POSTCONDITIONS if non-determinism is supported:

Specified by:
_createLabelEpsilonFreeNFA in class FSARelatedTests<L extends LabelInterface>
Returns:
A label epsilon-free NFA if non-determinism is supported otherwise null

_createStarDFA

protected RunnableFSAInterface<L> _createStarDFA()
Description copied from class: FSARelatedTests
Creates a star DFA.

POSTCONDITIONS:

Specified by:
_createStarDFA in class FSARelatedTests<L extends LabelInterface>
Returns:
A star DFA

_createStarNFA

protected RunnableFSAInterface<L> _createStarNFA()
Description copied from class: FSARelatedTests
Creates a star NFA if epsilon transitions are supported.

POSTCONDITIONS if epsilon transitions are supported:

Specified by:
_createStarNFA in class FSARelatedTests<L extends LabelInterface>
Returns:
A star NFA if epsilon transitions are supported otherwise null

getEmptyDFA

protected RunnableFSAInterface<L> getEmptyDFA()

getLabelDFA

protected RunnableFSAInterface<L> getLabelDFA()

getLabelEpsilonFreeNFA

protected RunnableFSAInterface<L> getLabelEpsilonFreeNFA()

getStarDFA

protected RunnableFSAInterface<L> getStarDFA()

getStarNFA

protected RunnableFSAInterface<L> getStarNFA()

_createRunnableFSAFactory

protected abstract AbstractRunnableFSAFactory<L> _createRunnableFSAFactory()

_createAlphabetInstance

protected AlphabetInterface<L> _createAlphabetInstance()
Description copied from class: FSARelatedTests
Creates a new empty Alphabet. POSTCONDITIONS:

Specified by:
_createAlphabetInstance in class FSARelatedTests<L extends LabelInterface>

testGetMutableFSA

public final void testGetMutableFSA()

testGetInitialConfigurationForwardsDFA

public final void testGetInitialConfigurationForwardsDFA()

testGetInitialConfigurationForwardsEpsilonFreeNFA

public final void testGetInitialConfigurationForwardsEpsilonFreeNFA()

testGetInitialConfigurationForwardsNFA

public final void testGetInitialConfigurationForwardsNFA()

testGetInitialConfigurationForwardsIsCopy

public final void testGetInitialConfigurationForwardsIsCopy()

testIsFinalConfigurationForwardsDFAReturnsFalse

public final void testIsFinalConfigurationForwardsDFAReturnsFalse()

testIsFinalConfigurationForwardsDFAReturnTrue

public final void testIsFinalConfigurationForwardsDFAReturnTrue()

testIsFinalConfigurationForwardsEpsilonFreeNFAReturnsFalse

public final void testIsFinalConfigurationForwardsEpsilonFreeNFAReturnsFalse()

testIsFinalConfigurationsForwardsEpsilonFreeNFAReturnsTrue

public final void testIsFinalConfigurationsForwardsEpsilonFreeNFAReturnsTrue()

testIsFinalConfigurationForwardsNFAReturnsFalse

public final void testIsFinalConfigurationForwardsNFAReturnsFalse()

testIsFinalConfigurationsForwardsNFAReturnsTrue

public final void testIsFinalConfigurationsForwardsNFAReturnsTrue()

testIsFinalConfigurationBackwardsReturnsFalse

public final void testIsFinalConfigurationBackwardsReturnsFalse()

testIsFinalConfigurationsBackwardsReturnsTrue

public final void testIsFinalConfigurationsBackwardsReturnsTrue()

testIsAcceptedStringForwardsEmptyDFA

public final void testIsAcceptedStringForwardsEmptyDFA()

testIsAcceptedStringForwardsLabelDFA

public final void testIsAcceptedStringForwardsLabelDFA()

testIsAcceptedStringForwardsStarDFA

public final void testIsAcceptedStringForwardsStarDFA()

testIsAcceptedStringForwardsLabelEpsilonFreeNFA

public final void testIsAcceptedStringForwardsLabelEpsilonFreeNFA()

testIsAcceptedStringForwardsStarNFA

public final void testIsAcceptedStringForwardsStarNFA()

testIsAcceptedStringBackwardsEmptyDFA

public final void testIsAcceptedStringBackwardsEmptyDFA()

testIsAcceptedStringBackwardsLabelDFA

public final void testIsAcceptedStringBackwardsLabelDFA()

testIsAcceptedStringBackwardsStarDFA

public final void testIsAcceptedStringBackwardsStarDFA()

testIsAcceptedStringBackwardsLabelEpsilonFreeNFA

public final void testIsAcceptedStringBackwardsLabelEpsilonFreeNFA()

testIsAcceptedStringBackwardsStarNFA

public final void testIsAcceptedStringBackwardsStarNFA()

testRunForwardsOnLabelNullConfiguration

public final void testRunForwardsOnLabelNullConfiguration()

testRunForwardsOnLabelNullState

public final void testRunForwardsOnLabelNullState()

testRunForwardsOnLabelStateNotInQ

public final void testRunForwardsOnLabelStateNotInQ()

testRunForwardsOnLabelNullLabel

public final void testRunForwardsOnLabelNullLabel()

testRunForwardsOnLabelLabelNotInSigma

public final void testRunForwardsOnLabelLabelNotInSigma()

testRunForwardsOnLabelNotIsTotalLabelInSigmaReturnsEmpty

public final void testRunForwardsOnLabelNotIsTotalLabelInSigmaReturnsEmpty()

testRunForwardsOnLabelDFALabelInSigmaReturnsNotEmpty

public final void testRunForwardsOnLabelDFALabelInSigmaReturnsNotEmpty()

testRunForwardsOnLabelEpsilonFreeNFALabelInSigmaReturnsNotEmpty

public final void testRunForwardsOnLabelEpsilonFreeNFALabelInSigmaReturnsNotEmpty()

testRunForwardsOnLabelNFALabelInSigmaReturnsNotEmpty

public final void testRunForwardsOnLabelNFALabelInSigmaReturnsNotEmpty()

testRunForwardsOnLabelNotIsTotalLabelInSigmaReturnsEmptyIsCopy

public final void testRunForwardsOnLabelNotIsTotalLabelInSigmaReturnsEmptyIsCopy()

testRunForwardsOnLabelLabelInSigmaReturnsNotEmptyIsCopy

public final void testRunForwardsOnLabelLabelInSigmaReturnsNotEmptyIsCopy()

testRunForwardsOnStringNullConfiguration

public final void testRunForwardsOnStringNullConfiguration()

testRunForwardsOnStringNullState

public final void testRunForwardsOnStringNullState()

testRunForwardsOnStringStateNotInQ

public final void testRunForwardsOnStringStateNotInQ()

testRunForwardsOnStringNullLabel

public final void testRunForwardsOnStringNullLabel()

testRunForwardsOnStringLabelNotInSigma

public final void testRunForwardsOnStringLabelNotInSigma()

testRunBackwardsOnLabelNullConfiguration

public final void testRunBackwardsOnLabelNullConfiguration()

testRunBackwardsOnLabelNullState

public final void testRunBackwardsOnLabelNullState()

testRunBackwardsOnLabelStateNotInQ

public final void testRunBackwardsOnLabelStateNotInQ()

testRunBackwardsOnLabelNullLabel

public final void testRunBackwardsOnLabelNullLabel()

testRunBackwardsOnLabelLabelNotInSigma

public final void testRunBackwardsOnLabelLabelNotInSigma()

testRunBackwardsOnLabelNotIsTotalLabelInSigmaReturnsEmpty

public final void testRunBackwardsOnLabelNotIsTotalLabelInSigmaReturnsEmpty()

testRunBackwardsOnLabelDFALabelInSigmaReturnsNotEmpty

public final void testRunBackwardsOnLabelDFALabelInSigmaReturnsNotEmpty()

testRunBackwardsOnLabelEpsilonFreeNFALabelInSigmaReturnsNotEmpty

public final void testRunBackwardsOnLabelEpsilonFreeNFALabelInSigmaReturnsNotEmpty()

testRunBackwardsOnLabelNFALabelInSigmaReturnsNotEmpty

public final void testRunBackwardsOnLabelNFALabelInSigmaReturnsNotEmpty()

testRunBackwardsOnLabelNotIsTotalLabelInSigmaReturnsEmptyIsCopy

public final void testRunBackwardsOnLabelNotIsTotalLabelInSigmaReturnsEmptyIsCopy()

testRunBackwardsOnLabelLabelInSigmaReturnsNotEmptyIsCopy

public final void testRunBackwardsOnLabelLabelInSigmaReturnsNotEmptyIsCopy()

testRunBackwardsOnLabelForwardsDFABecomesBackwardsNFA

public final void testRunBackwardsOnLabelForwardsDFABecomesBackwardsNFA()

testRunBackwardsOnStringNullConfiguration

public final void testRunBackwardsOnStringNullConfiguration()

testRunBackwardsOnStringNullState

public final void testRunBackwardsOnStringNullState()

testRunBackwardsOnStringStateNotInQ

public final void testRunBackwardsOnStringStateNotInQ()

testRunBackwardsOnStringNullLabel

public final void testRunBackwardsOnStringNullLabel()

testRunBackwardsOnStringLabelNotInSigma

public final void testRunBackwardsOnStringLabelNotInSigma()