mj                                       Sat, 14 May 2011 20:29:46 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=311020

Log:
Fixed two failing tests that were caused by arbitrarily chosen
but apparently bogus upper resp. lower limits for mt_rand().

Changed paths:
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation1.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation2.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation1.phpt
===================================================================
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation1.phpt    
    2011-05-14 20:28:14 UTC (rev 311019)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation1.phpt    
    2011-05-14 20:29:46 UTC (rev 311020)
@@ -38,7 +38,7 @@
        // float data
 /*6*/  10.5,
        -10.5,
-       12.3456789000e10,
+       12.3456789000E8,
        12.3456789000E-10,
        .5,

@@ -79,7 +79,7 @@
 $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);

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation2.phpt
===================================================================
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation2.phpt    
    2011-05-14 20:28:14 UTC (rev 311019)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/math/mt_rand_variation2.phpt    
    2011-05-14 20:29:46 UTC (rev 311020)
@@ -79,7 +79,7 @@
 $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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to