mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
Fixed two failing tests that were caused by arbitrarily chosen
but apparently bogus upper resp. lower limits for mt_rand().
This commit is contained in:
@@ -38,7 +38,7 @@ $inputs = array(
|
||||
// float data
|
||||
/*6*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E8,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
@@ -79,7 +79,7 @@ $inputs = array(
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(mt_rand($input, 100));
|
||||
var_dump(mt_rand($input, mt_getrandmax()));
|
||||
$iterator++;
|
||||
};
|
||||
fclose($fp);
|
||||
|
||||
@@ -79,7 +79,7 @@ $inputs = array(
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(mt_rand(100, $input));
|
||||
var_dump(mt_rand(-1 * mt_getrandmax(), $input));
|
||||
$iterator++;
|
||||
};
|
||||
fclose($fp);
|
||||
|
||||
Reference in New Issue
Block a user