updates
This commit is contained in:
parent
d1c46f2ff8
commit
d2ed65b88a
7 changed files with 7 additions and 6 deletions
|
|
@ -374,6 +374,7 @@ class Driver {
|
|||
var magicFrame = magic.contentDocument.getElementById("magicframe");
|
||||
magicFrame.contentDocument.open();
|
||||
magicFrame.contentDocument.write("<!DOCTYPE html><head><title>benchmark payload</title></head><body>\n" + string + "</body></html>");
|
||||
|
||||
return magicFrame;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Benchmark {
|
|||
}
|
||||
}
|
||||
|
||||
validate()
|
||||
validate(iterations)
|
||||
{
|
||||
for (let flightPlan of expectedFlightPlans) {
|
||||
flightPlan.calculate();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class Benchmark {
|
|||
this.ast = parse("LowLevelInterpreter.asm");
|
||||
}
|
||||
|
||||
validate()
|
||||
validate(iterations)
|
||||
{
|
||||
let astDumpedAsLines = this.ast.dump().split("\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class Benchmark {
|
|||
areFirstAndLastResultsEqual(() => bd1.dividedBy(bd2));
|
||||
}
|
||||
|
||||
validate() {
|
||||
validate(iterations) {
|
||||
if (!this._allFirstAndLastResultsAreEqual)
|
||||
throw new Error("Expected all first and last results to be equal, but they aren't.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class Benchmark {
|
|||
this._decryptedMulIsCorrect &&= decryptedMul === 123456789012345678900n;
|
||||
}
|
||||
|
||||
validate() {
|
||||
validate(iterations) {
|
||||
if (!this._c1DecryptedIsCorrect)
|
||||
throw new Error("Bad value: c1Decrypted!");
|
||||
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ class Benchmark {
|
|||
}
|
||||
}
|
||||
|
||||
validate() {
|
||||
validate(iterations) {
|
||||
if (this.tokenCount !== 113975)
|
||||
throw new Error(`this.tokenCount of ${this.tokenCount} is invalid!`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ class Benchmark {
|
|||
this.totalLength += binaryTree().length;
|
||||
}
|
||||
|
||||
validate() {
|
||||
validate(iterations) {
|
||||
if (this.totalLength !== 635)
|
||||
throw new Error(`this.totalLength of ${this.totalLength} is invalid!`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue