Improve test usleep_basic by inlining its output

Closes GH-4703.
This commit is contained in:
Fabien Villepinte 2019-09-14 08:38:33 +02:00 committed by Nikita Popov
parent 803dc6b8f2
commit 1792adebfd

View File

@ -27,17 +27,16 @@ usleep($sleeptime);
$time_end = microtime(true);
$time = ($time_end - $time_start) * 1000 * 1000;
echo "Thread slept for " . $time . " micro-seconds\n";
$summary = "Thread slept for " . $time . " micro-seconds\n";
if ($time >= $sleeplow) {
echo "TEST PASSED\n";
echo "TEST PASSED: $summary";
} else {
echo "TEST FAILED\n";
echo "TEST FAILED: $summary";
}
?>
===DONE===
--EXPECTF--
*** Testing usleep() : basic functionality ***
Thread slept for %f micro-seconds
TEST PASSED
TEST PASSED: Thread slept for %f micro-seconds
===DONE===