From a88c68f833efeee552fdcb255787eee680a7e76e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 2 Jul 2015 10:51:26 +0200 Subject: [PATCH] improve timings evaluations in test --- .../tests/streams/proc_open_bug69900.phpt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ext/standard/tests/streams/proc_open_bug69900.phpt b/ext/standard/tests/streams/proc_open_bug69900.phpt index b3523294a7..c98fd97eb4 100644 --- a/ext/standard/tests/streams/proc_open_bug69900.phpt +++ b/ext/standard/tests/streams/proc_open_bug69900.phpt @@ -33,7 +33,7 @@ for($i = 0; $i < 10; $i++){ $t1 = microtime(1); echo $s; - echo "fgets() took ", (($t1 - $t0)*1000), "ms\n"; + echo "fgets() took ", (($t1 - $t0)*1000 > 1 ? 'more' : 'less'), " than 1 ms\n"; } fclose($pipes[0]); @@ -48,25 +48,25 @@ proc_close($process); $fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; @unlink($fl); ?> ---EXPECTF-- +--EXPECT-- hello0 -fgets() took %d%sms +fgets() took more than 1 ms hello1 -fgets() took 0%sms +fgets() took less than 1 ms hello2 -fgets() took 0%sms +fgets() took less than 1 ms hello3 -fgets() took 0%sms +fgets() took less than 1 ms hello4 -fgets() took 0%sms +fgets() took less than 1 ms hello5 -fgets() took 0%sms +fgets() took less than 1 ms hello6 -fgets() took 0%sms +fgets() took less than 1 ms hello7 -fgets() took 0%sms +fgets() took less than 1 ms hello8 -fgets() took 0%sms +fgets() took less than 1 ms hello9 -fgets() took 0%sms +fgets() took less than 1 ms ===DONE=== -- 2.50.1