summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/thread/thread.condition
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-12-23 23:37:52 +0000
committerEric Fiselier <eric@efcs.ca>2016-12-23 23:37:52 +0000
commitfd838227411f3ce1fa348f1d334266231bbcc84d (patch)
tree204de9a3dad8b79d83bba224d8f6d4775169483f /libcxx/test/std/thread/thread.condition
parent16166a4d71fca27f454a0837465143700dd41e98 (diff)
downloadbcm5719-llvm-fd838227411f3ce1fa348f1d334266231bbcc84d.tar.gz
bcm5719-llvm-fd838227411f3ce1fa348f1d334266231bbcc84d.zip
Fix unused parameters and variables
llvm-svn: 290459
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.cpp9
1 files changed, 5 insertions, 4 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 b2403079275..d7066f4bff4 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
@@ -45,7 +45,7 @@ int test2 = 0;
int runs = 0;
-void f()
+void f(bool expect_result)
{
typedef std::chrono::system_clock Clock;
typedef std::chrono::milliseconds milliseconds;
@@ -54,7 +54,8 @@ void f()
test1 = 1;
cv.notify_one();
Clock::time_point t0 = Clock::now();
- bool r = cv.wait_for(lk, milliseconds(250), Pred(test2));
+ bool result = cv.wait_for(lk, milliseconds(250), Pred(test2));
+ assert(result == expect_result);
Clock::time_point t1 = Clock::now();
if (runs == 0)
{
@@ -73,7 +74,7 @@ int main()
{
{
L1 lk(m0);
- std::thread t(f);
+ std::thread t(f, /*expect_result*/true);
assert(test1 == 0);
while (test1 == 0)
cv.wait(lk);
@@ -87,7 +88,7 @@ int main()
test2 = 0;
{
L1 lk(m0);
- std::thread t(f);
+ std::thread t(f, /*expect_result*/false);
assert(test1 == 0);
while (test1 == 0)
cv.wait(lk);
OpenPOWER on IntegriCloud