Fix tests compilation without threads.

This commit is contained in:
levlam 2021-10-25 10:37:38 +03:00
parent c5a2f1570d
commit 51cf4baee6
2 changed files with 4 additions and 0 deletions

View File

@ -156,6 +156,7 @@ TEST(Misc, TsList) {
} }
} }
#if !TD_THREAD_UNSUPPORTED
TEST(Misc, TsListConcurrent) { TEST(Misc, TsListConcurrent) {
td::TsList<ListData> root; td::TsList<ListData> root;
td::vector<td::thread> threads; td::vector<td::thread> threads;
@ -165,3 +166,4 @@ TEST(Misc, TsListConcurrent) {
[&] { do_run_list_test<td::TsListNode<ListData>, td::TsList<ListData>, td::TsListNode<ListData>>(root, id); }); [&] { do_run_list_test<td::TsListNode<ListData>, td::TsList<ListData>, td::TsListNode<ListData>>(root, id); });
} }
} }
#endif

View File

@ -26,6 +26,7 @@ TEST(StealingQueue, very_simple) {
ASSERT_EQ(1, x); ASSERT_EQ(1, x);
} }
#if !TD_THREAD_UNSUPPORTED
TEST(AtomicRead, simple) { TEST(AtomicRead, simple) {
td::Stage run; td::Stage run;
td::Stage check; td::Stage check;
@ -176,3 +177,4 @@ TEST(StealingQueue, simple) {
thread.join(); thread.join();
} }
} }
#endif