Example #1
0
  public static void testDriver(int length) {
    BST t = new BST();

    for (int i = 0; i < length; i++) {
      Verify.beginAtomic();
      switch (Verify.random(1)) {
        case 0:
          System.out.println("adding...");
          t.add(0);
          break;
        case 1:
          System.out.println("removing...");
          t.remove(0);
          break;
        case 2:
          System.out.println("finding...");
          t.find(0);
          break;
      }
      Verify.endAtomic();

      Verify.ignoreIf(Subsumption.storeAndCheckSubsumption());
    }
  }
Example #2
0
 public static void main(String[] args) {
   testDriver(4); // with 2 you do not get complete coverage
   Subsumption.printAllStates();
   System.out.println();
 }