diff options
Diffstat (limited to 'libcxx/test/std/thread/thread.condition')
-rw-r--r-- | libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp index d7066f4bff4..47da788335c 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp @@ -44,8 +44,9 @@ int test1 = 0; int test2 = 0; int runs = 0; +bool expect_result = false; -void f(bool expect_result) +void f() { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds milliseconds; @@ -73,8 +74,9 @@ void f(bool expect_result) int main() { { + expect_result = true; L1 lk(m0); - std::thread t(f, /*expect_result*/true); + std::thread t(f); assert(test1 == 0); while (test1 == 0) cv.wait(lk); @@ -87,8 +89,9 @@ int main() test1 = 0; test2 = 0; { + expect_result = false; L1 lk(m0); - std::thread t(f, /*expect_result*/false); + std::thread t(f); assert(test1 == 0); while (test1 == 0) cv.wait(lk); |