Skip to content

Commit

Permalink
#1173: tests: fix feature check
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Feb 1, 2021
1 parent 36e10c6 commit 5735f94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/atomic/test_atomic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static AtomicType<int> atomic_test_val = {0};
static AtomicType<int> atomic_num = {0};
static std::vector<bool> 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);
Expand All @@ -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<int> atomic_test_cas = {0};
static AtomicType<int> 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;
Expand All @@ -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);
Expand Down

0 comments on commit 5735f94

Please sign in to comment.