File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -309,9 +309,16 @@ function run() {
309
309
310
310
311
311
class Benchmark {
312
+ EXPECTED_RESULT_HASH = 439041101 ;
313
+
312
314
runIteration ( ) {
313
315
this . resultHash = 0x1a2b3c4d ;
314
316
for ( let i = 0 ; i < 8 ; ++ i )
315
317
this . resultHash ^= run ( ) ;
316
318
}
319
+
320
+ validate ( ) {
321
+ if ( this . resultHash != this . EXPECTED_RESULT_HASH )
322
+ throw new Error ( `Got unexpected result hash ${ this . resultHash } instead of ${ this . EXPECTED_RESULT_HASH } ` )
323
+ }
317
324
}
Original file line number Diff line number Diff line change @@ -428,9 +428,16 @@ function run() {
428
428
429
429
430
430
class Benchmark {
431
+ EXPECTED_RESULT_HASH = 439041101 ;
432
+
431
433
runIteration ( ) {
432
434
this . resultHash = 0x1a2b3c4d ;
433
435
for ( let i = 0 ; i < 8 ; ++ i )
434
436
this . resultHash ^= run ( ) ;
435
437
}
438
+
439
+ validate ( ) {
440
+ if ( this . resultHash != this . EXPECTED_RESULT_HASH )
441
+ throw new Error ( `Got unexpected result hash ${ this . resultHash } instead of ${ this . EXPECTED_RESULT_HASH } ` )
442
+ }
436
443
}
You can’t perform that action at this time.
0 commit comments