if (args.length == 0) {
System.out.println("Running all tests...");
TestRunner.run(AllTests.suite());
} else if ("--stats".equals(args[0])) {
// Delegate to new stats test runner
String[] args2 = new String[args.length - 1];
System.arraycopy(args, 1, args2, 0, args2.length);
if (args2.length == 0) {
System.out.println("Running all tests with stats...");
StatTestRunner.run(AllTests.suite());
} else {
System.out.println("Running selected tests with stats...");
StatTestRunner.main(args2);
}
} else {
System.out.println("Running selected tests...");
CoreTestRunner.main(args);
}
Runtime.getRuntime().halt(0);