From 5735f94f5bf2b380b780d5d6ea50baa1837ee91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 25 Jan 2021 22:09:19 +0100 Subject: [PATCH] #1173: tests: fix feature check --- tests/unit/atomic/test_atomic.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/atomic/test_atomic.cc b/tests/unit/atomic/test_atomic.cc index 685121c2d4..509851c825 100644 --- a/tests/unit/atomic/test_atomic.cc +++ b/tests/unit/atomic/test_atomic.cc @@ -115,7 +115,7 @@ static AtomicType atomic_test_val = {0}; static AtomicType atomic_num = {0}; static std::vector count(num_workers); -#if vt_check_enabled(openmp) +#if vt_check_enabled(openmp) or vt_check_enabled(stdthread) static void testAtomicMulti() { auto val = atomic_test_val.fetch_add(1); //fmt::print("val={}\n", val); @@ -130,12 +130,12 @@ static void testAtomicMulti() { EXPECT_EQ(val2, 0); } } -#endif /* vt_check_enabled(openmp) */ +#endif /* vt_check_enabled(openmp) or vt_check_enabled(stdthread) */ static AtomicType atomic_test_cas = {0}; static AtomicType atomic_test_slot = {0}; -#if vt_check_enabled(openmp) +#if vt_check_enabled(openmp) or vt_check_enabled(stdthread) static void testAtomicMultiCAS() { int expected = atomic_test_slot.fetch_add(1); int desired = expected + 1; @@ -149,7 +149,7 @@ static void testAtomicMultiCAS() { //fmt::print("finished: expected={}, desired={}\n", expected, desired); } -#endif /* vt_check_enabled(openmp) */ +#endif /* vt_check_enabled(openmp) or vt_check_enabled(stdthread) */ TEST_F(TestAtomic, basic_atomic_fetch_add_multi_thd) { count.resize(num_workers);