Package statechum.model.testset

Examples of statechum.model.testset.PrefixFreeCollection


   */
  @Test
  public final void testAppendSequence0()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{}
      },config);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here


   */
  @Test
  public final void testAppendSequence0b()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0b",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{}));

    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{}
      },config);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence1()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence1",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      },config);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence2()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence2",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      },config);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","b"}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence3()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence3",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b","c"}
      },config);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","b","c"}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence4()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence4",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"p","p"}
      },config);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","p"}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   */
  @Test
  public final void testAppendSequence5()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence5",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"p","p","p"}
      },config);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p"}));
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","p"}));
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","p","p"}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0() {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","p","p"},
        new String[]{"g"}
      },config);
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {
        new String[]{"p"},
        new String[]{"p","p"},
        new String[] {},
        new String [] {"g"},
        new String[]{"p","p","p"}}
    ,config));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0b() {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0b",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<Label>> expected = buildSet(new String[][]{
      },config);
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {},config));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences1() {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences1",config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"g"},
        new String[]{"p","p","p"}
      },config);
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {
        new String[]{"p"},
        new String[]{"p","p"},
        new String[] {},
        new String [] {"g"},
        new String[]{"p","p","p"}}
    ,config));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

TOP

Related Classes of statechum.model.testset.PrefixFreeCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.