Skip to content

Improve test usleep_basic by inlining its output #4703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions ext/standard/tests/general_functions/usleep_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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===