From e0a8b5c35718a4e28593cdf4d9a9c402effced6c Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Sat, 6 Nov 2010 13:30:32 -0700 Subject: [PATCH] Bug 555393 - relax this Math.random() test so it fails less frequently than once a month --- js/src/tests/js1_5/Regress/regress-211590.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/tests/js1_5/Regress/regress-211590.js b/js/src/tests/js1_5/Regress/regress-211590.js index 0f2023a42ec..4271415997f 100644 --- a/js/src/tests/js1_5/Regress/regress-211590.js +++ b/js/src/tests/js1_5/Regress/regress-211590.js @@ -40,7 +40,7 @@ var BUGNUMBER = 211590; var summary = 'Math.random should be random'; var actual = ''; -var expect = 'between 48% and 52%'; +var expect = 'between 47.5% and 52.5%'; printBugNumber(BUGNUMBER); printStatus (summary); @@ -64,7 +64,7 @@ for ( var i = 0; i < n; ++i ) odd1 *= 100 / n; odd2 *= 100 / n; -if (odd1 >= 48 && odd1 <= 52) +if (odd1 >= 47.5 && odd1 <= 52.5) { actual = expect; } @@ -75,7 +75,7 @@ else reportCompare(expect, actual, summary); -if (odd2 >= 48 && odd2 <= 52) +if (odd2 >= 47.5 && odd2 <= 52.5) { actual = expect; }