int switchSource = 0; if (args.length == 0) { // This is the controller
// This code is for an exhaustive test //while(switchSource < 2187) { // int temp = switchSource++;
// This code is for a weaker but faster test for(int x=0; x<100; x++) { int temp = generator.nextInt(2187); for(int i=0; i<7; i++) {
switches[i] = temp % 3;
temp = temp / 3;
}
// Spawn new VM and load classes
String command = System.getProperty("java.home") +
File.separator + "bin" + File.separator + "java Assert";
Process p = null;
p = Runtime.getRuntime().exec(commandString.toString());
if (debug) { // See output of test VMs
BufferedReader blah = new BufferedReader( new InputStreamReader(p.getInputStream()));
String outString = blah.readLine(); while (outString != null) {
System.out.println("from BufferedReader:"+outString);
outString = blah.readLine();
}
}
p.waitFor(); int result = p.exitValue(); if (debug) { // See which switch configs failed if (result == 0) { for(int k=6; k>=0; k--)
System.out.print(switches[k]);
System.out.println();
} else {
System.out.print("Nonzero Exit: "); for(int k=6; k>=0; k--)
System.out.print(switches[k]);
System.out.println();
}
} else { if (result != 0) {
System.err.print("Nonzero Exit: "); for(int k=6; k>=0; k--)
System.err.print(switches[k]);
System.err.println(); thrownew RuntimeException("Assertion test failure.");
}
}
}
} else { // This is a test spawn for(int i=0; i<7; i++)
switches[i] = Integer.parseInt(args[i]);
/* *Createtheclasstreetobetested.Eachtestrunmustreloadtheclasses *ofthetreesinceassertionstatusisdeterminedatclassloadtime.
*/ privatestaticvoid ConstructClassTree() {
testClass1 = new Class1();
testClass2 = new Class2();
testClass3 = new Class3();
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.