This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Make the condvar wait_for tests a bit more understandable. NFC.
ClosedPublic

Authored by mstorsjo on Apr 1 2021, 1:56 PM.

Details

Summary

This was requested in the review of D99175; rename the "runs"
variable to clarify what it means wrt the test, and move updating of
it to the main function to clarify its behaviour wrt the two runs
further.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Apr 1 2021, 1:56 PM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2021, 1:56 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
curdeius accepted this revision as: curdeius.Apr 1 2021, 2:08 PM
curdeius added a subscriber: curdeius.

LGTM.

Quuxplusone added inline comments.Apr 1 2021, 2:39 PM
libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp
36

Is there a reason we can't do void f(bool expect_timeout)?

mstorsjo added inline comments.Apr 1 2021, 3:13 PM
libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp
36

I guess we could, although I'm not sure if that makes it significantly more readable...

(Also, feel free to commandeer the patch.)

Quuxplusone accepted this revision.Apr 1 2021, 4:51 PM

Meh. 😛

This revision is now accepted and ready to land.Apr 1 2021, 4:51 PM
This revision was landed with ongoing or failed builds.Apr 2 2021, 12:56 AM
This revision was automatically updated to reflect the committed changes.