| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --random-seed=12 --nostress-opt --noalways-opt --predictable | 5 // Flags: --random-seed=20 --nostress-opt --noalways-opt --predictable |
| 6 | 6 |
| 7 (function() { | 7 (function() { |
| 8 var kHistory = 2; | 8 var kHistory = 2; |
| 9 var kRepeats = 100; | 9 var kRepeats = 100; |
| 10 var history = new Uint32Array(kHistory); | 10 var history = new Uint32Array(kHistory); |
| 11 | 11 |
| 12 function random() { | 12 function random() { |
| 13 return (Math.random() * Math.pow(2, 32)) >>> 0; | 13 return (Math.random() * Math.pow(2, 32)) >>> 0; |
| 14 } | 14 } |
| 15 | 15 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // For 1 degree of freedom this corresponds to 1 in a million. We are | 60 // For 1 degree of freedom this corresponds to 1 in a million. We are |
| 61 // running ~8000 tests, so that would be surprising. | 61 // running ~8000 tests, so that would be surprising. |
| 62 assertTrue(chi_squared <= 24); | 62 assertTrue(chi_squared <= 24); |
| 63 // If the predictor bit is a fixed 0 or 1 then it makes no sense to | 63 // If the predictor bit is a fixed 0 or 1 then it makes no sense to |
| 64 // repeat the test with a different age. | 64 // repeat the test with a different age. |
| 65 if (predictor_bit < 0) break; | 65 if (predictor_bit < 0) break; |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 })(); | 69 })(); |
| OLD | NEW |