Package statechum.model.testset

Examples of statechum.model.testset.PTASequenceSet


  }
 
  @Test
  public final void testPrefixRemovingCollection7a()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addSequence(new LinkedList<Label>());
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{}));
    c.addSequence(labelList(new String[]{"a","b"}));
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{"a"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
    },config,converter),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(1, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here


  }
 
  @Test
  public final void testPrefixRemovingCollection7b()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addSequence(new LinkedList<Label>());
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{}));
    c.addSequence(labelList(new String[]{"a","b"}));
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{"a"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
    },config,converter),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(1, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

  }
 
  @Test
  public final void testPrefixRemovingCollection8()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addSequence(new LinkedList<Label>());
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{}));
    c.addSequence(labelList(new String[]{"a","b"}));
    c.addSequence(labelList(new String[]{"a","c","d"}));
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{"a"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
        new String[]{"a","c","d"}
    },config,converter),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(2, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c","d"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

  }
 
  @Test
  public final void testPrefixRemovingCollection9()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addAll(buildSet(new String[][] {
      new String[]{"a"},
      new String[]{},
      new String[]{"a","b"},
      new String[]{"a","c","d"},
      new String[]{"a"},
      new String[]{"a"}},config,converter));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
        new String[]{"a","c","d"}
    },config,converter),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(2, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c","d"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

  }
 
  @Test
  public final void testPrefixRemovingCollection10()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addAll(buildSet(new String[][] {
      new String[]{"a"},
      new String[]{},
      new String[]{"a","b"}},config,converter));
   
    PTASequenceSet d = new PTASequenceSet();
    d.addAll(buildSet(new String[][] {   
      new String[]{"a","c","d"},
      new String[]{"a"},
      new String[]{"a"}},config,converter));
    c.addAll(d);
    Set<List<Label>> expected = buildSet(new String[][]{
View Full Code Here

  }
 
  @Test
  public final void testPrefixRemovingCollection11()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addAll(buildSet(new String[][] {
      new String[]{"a"},
      new String[]{},
      new String[]{"a","b"},
      new String[]{"a","c","d"},
      new String[]{"a"},
      new String[]{"a"}},config,converter));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
        new String[]{"a","c","d"}
    },config,converter),actual = new HashSet<List<Label>>();actual.addAll(c);
    Assert.assertEquals(2, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c","d"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

   * generating walks.
   */
  protected void initAllSequences()
  {
    tag = new StateName(0,false);
    allSequences = new PTASequenceSet(new PercentLabelledPTA());extraSequences = new PTASequenceSet(new PercentLabelledPTA());
  }
View Full Code Here

TOP

Related Classes of statechum.model.testset.PTASequenceSet

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.