From 258f92652dec367807b4a3da7de7113dff3182f8 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 17 Nov 2019 21:41:23 +0300 Subject: [PATCH] Fix tests build for Emscripten. GitOrigin-RevId: 7dec0a02befeb55379f39f1644cf64077db27ed7 --- test/main.cpp | 2 +- test/tdclient.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/main.cpp b/test/main.cpp index 206470483..c0f31cea6 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -30,7 +30,7 @@ int main(int argc, char **argv) { } #if TD_EMSCRIPTEN emscripten_set_main_loop( - [] { + [&runner] { if (!runner.run_all_step()) { emscripten_cancel_main_loop(); } diff --git a/test/tdclient.cpp b/test/tdclient.cpp index d88d4a265..e95770d2e 100644 --- a/test/tdclient.cpp +++ b/test/tdclient.cpp @@ -874,6 +874,7 @@ TEST(Client, SimpleMulti) { } } +#if !TD_THREAD_UNSUPPORTED TEST(Client, Multi) { std::vector threads; for (int i = 0; i < 4; i++) { @@ -895,6 +896,7 @@ TEST(Client, Multi) { thread.join(); } } +#endif TEST(PartsManager, hands) { //Status init(int64 size, int64 expected_size, bool is_size_final, size_t part_size,