From: Peizhao Ou Date: Tue, 13 Mar 2018 00:29:05 +0000 (-0700) Subject: Refactors parallel barrier test X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=commitdiff_plain;h=3363113cd0aebbda4ad5e2ba927354291f30c4aa Refactors parallel barrier test --- diff --git a/test/stress/misc/barrier_driver.cpp b/test/stress/misc/barrier_driver.cpp index 8dfc41dc..272e3c43 100644 --- a/test/stress/misc/barrier_driver.cpp +++ b/test/stress/misc/barrier_driver.cpp @@ -48,8 +48,8 @@ TEST_F(BarrierTest, Wait) { threads.push_back(std::thread(Thread)); } - for (size_t i = 0; i < s_nBarrierThreadCount; i++) { - threads[i].join(); + for (auto& thrd : threads) { + thrd.join(); } EXPECT_EQ(count, s_nBarrierPassCount); delete barrier;