com php-src: Run gmp_random tests more quickly: ext /gmp/tests/gmp_random_bits.phpt ext/gmp/tests/gmp_ran dom_range.phpt

From: Date: Thu, 16 Apr 2015 14:29:57 +0000
Subject: com php-src: Run gmp_random tests more quickly: ext /gmp/tests/gmp_random_bits.phpt ext/gmp/tests/gmp_ran dom_range.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86333@lists.php.net to get a copy of this message
Commit: 25e45a935036d1bc69ed5dda323c09ab1f160d6e Author: Nikita Popov <nikic@php.net> Thu, 16 Apr 2015 16:29:57 +0200 Parents: 7e049b04270b3f46970dcf68b8b2bf12e0c6babd Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=25e45a935036d1bc69ed5dda323c09ab1f160d6e Log: Run gmp_random tests more quickly Changed paths: M ext/gmp/tests/gmp_random_bits.phpt M ext/gmp/tests/gmp_random_range.phpt Diff: diff --git a/ext/gmp/tests/gmp_random_bits.phpt b/ext/gmp/tests/gmp_random_bits.phpt index 21d493c..b4aa5d7 100644 --- a/ext/gmp/tests/gmp_random_bits.phpt +++ b/ext/gmp/tests/gmp_random_bits.phpt @@ -13,7 +13,7 @@ var_dump(gmp_random_bits(-1)); gmp_random_bits(1); gmp_random_bits(1024); -// 2 seconds to make sure the numbers stay in range +// 0.5 seconds to make sure the numbers stay in range $start = microtime(true); $limit = (2 ** 30) - 1; while (1) { @@ -26,7 +26,7 @@ while (1) { } } - if (microtime(true) - $start > 2) { + if (microtime(true) - $start > 0.5) { break; } } diff --git a/ext/gmp/tests/gmp_random_range.phpt b/ext/gmp/tests/gmp_random_range.phpt index a8e7c4a..db2ece6 100644 --- a/ext/gmp/tests/gmp_random_range.phpt +++ b/ext/gmp/tests/gmp_random_range.phpt @@ -30,7 +30,7 @@ gmp_random_range(-1, $plusTen); gmp_random_range($zero, $plusTen); gmp_random_range($minusTen, $plusTen); -// 2 seconds to make sure the numbers stay in range +// 0.5 seconds to make sure the numbers stay in range $start = microtime(true); while (1) { for ($i = 0; $i < 5000; $i++) { @@ -56,7 +56,7 @@ while (1) { } } - if (microtime(true) - $start > 2) { + if (microtime(true) - $start > 0.5) { break; } }

« previous php.cvs (#86333) next »