From 153b27dff12678a2bd3d4a76e8f515e7e0403a26 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 28 Apr 2016 20:08:48 +0200 Subject: [PATCH] Fix GC tests on dbg-zts-nocache We may collect a different number of zvals depending on interning. Switch tests to compare against a minimum number of collections instead of a fixed value. --- Zend/tests/gc_013.phpt | 4 ++-- Zend/tests/gc_014.phpt | 4 ++-- Zend/tests/gc_015.phpt | 4 ++-- Zend/tests/gc_017.phpt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Zend/tests/gc_013.phpt b/Zend/tests/gc_013.phpt index 9209ca2b40..0c5424086a 100644 --- a/Zend/tests/gc_013.phpt +++ b/Zend/tests/gc_013.phpt @@ -10,9 +10,9 @@ for ($i = 0; $i < 10001; $i++) { } $a[] = "xxx"; unset($a); -var_dump(gc_collect_cycles()); +var_dump(gc_collect_cycles() > 0); echo "ok\n"; ?> --EXPECT-- -int(2) +bool(true) ok diff --git a/Zend/tests/gc_014.phpt b/Zend/tests/gc_014.phpt index cd5a15e681..4fd8948af5 100644 --- a/Zend/tests/gc_014.phpt +++ b/Zend/tests/gc_014.phpt @@ -12,9 +12,9 @@ for ($i = 0; $i < 10001; $i++) { unset($b); $a->b = "xxx"; unset($a); -var_dump(gc_collect_cycles()); +var_dump(gc_collect_cycles() > 0); echo "ok\n"; ?> --EXPECT-- -int(2) +bool(true) ok diff --git a/Zend/tests/gc_015.phpt b/Zend/tests/gc_015.phpt index df85836ed8..24acddeae1 100644 --- a/Zend/tests/gc_015.phpt +++ b/Zend/tests/gc_015.phpt @@ -12,9 +12,9 @@ $a->b = "xxx"; unset($c); unset($a); unset($b); -var_dump(gc_collect_cycles()); +var_dump(gc_collect_cycles() > 0); echo "ok\n"; ?> --EXPECT-- -int(2) +bool(true) ok diff --git a/Zend/tests/gc_017.phpt b/Zend/tests/gc_017.phpt index 28d51980c9..a1a8c3eaf6 100644 --- a/Zend/tests/gc_017.phpt +++ b/Zend/tests/gc_017.phpt @@ -31,12 +31,12 @@ $a->insert($c); unset($a); unset($b); unset($c); -var_dump(gc_collect_cycles()); +var_dump(gc_collect_cycles() >= 7); echo "ok\n" ?> --EXPECTF-- string(1) "%s" string(1) "%s" string(1) "%s" -int(10) +bool(true) ok -- 2.40.0