summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2006-12-28 19:52:37 +0000
committerNuno Lopes <nlopess@php.net>2006-12-28 19:52:37 +0000
commit559ab4b3f9b3055daffd4e50bbee6a5b2405707a (patch)
treed059667a2a0b182285335a50cfbc1f4a6e79a120 /ext/zlib
parent794845234ee364a6ad7fcbdb953a9175d4ad25e9 (diff)
downloadphp-git-559ab4b3f9b3055daffd4e50bbee6a5b2405707a.tar.gz
make this test run a little faster (is currently timeout with valgrind)
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/tests/bug_34821.phpt16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/zlib/tests/bug_34821.phpt b/ext/zlib/tests/bug_34821.phpt
index a9da24612e..e1a97fca35 100644
--- a/ext/zlib/tests/bug_34821.phpt
+++ b/ext/zlib/tests/bug_34821.phpt
@@ -10,20 +10,20 @@ $b = array(
50,
500,
5000,
- 500000,
+ 250000,
// 1000000, // works, but test would take too long
);
-srand(time());
+$s = '';
+$i = 0;
foreach ($b as $size) {
- $s = '';
- for ($i = 0; $i <= $size; ++$i) {
+ do {
$s .= chr(rand(0,255));
- }
- var_dump($s == gzinflate(gzdeflate($s)));
- var_dump($s == gzuncompress(gzcompress($s)));
- var_dump($s == gzinflate(substr(gzencode($s), 10, -8)));
+ } while (++$i < $size);
+ var_dump($s === gzinflate(gzdeflate($s)));
+ var_dump($s === gzuncompress(gzcompress($s)));
+ var_dump($s === gzinflate(substr(gzencode($s), 10, -8)));
}
?>
--EXPECT--