예제 #1
0
 public static void main(String args[]) {
   // is there anything to do?
   if (args.length == 0) {
     printUsage();
     System.exit(1);
   }
   if (args.length > 1) {
     if (args[1].equals("yes")) {
       fStdOut = true;
     }
   }
   new Test(args[0]);
 }
예제 #2
0
  public Test(String arg) {
    if (arg.equals("all")) {
      boolean all = false;
      all = performTest("delete");
      all = performTest("extract") && all;
      all = performTest("clone") && all;
      all = performTest("insert") && all;
      all = performTest("surround") && all;
      all = performTest("insert2") && all;
      all = performTest("delete2") && all;
      if (all) {
        System.out.println("Done.");

      } else {
        System.out.println("*** ONE OR MORE TESTS FAILED! ***");
        System.exit(1);
      }

    } else {
      performTest(arg);
    }
  }