diff --git a/tdutils/test/SharedSlice.cpp b/tdutils/test/SharedSlice.cpp index e303eda71..440483c2c 100644 --- a/tdutils/test/SharedSlice.cpp +++ b/tdutils/test/SharedSlice.cpp @@ -9,6 +9,9 @@ #include "td/utils/SharedSlice.h" #include "td/utils/tests.h" +char disable_linker_warning_about_empty_file_tdutils_test_shared_slice_cpp TD_UNUSED; + +#if !TD_THREAD_UNSUPPORTED TEST(SharedSlice, Hands) { { td::SharedSlice h("hello"); @@ -84,3 +87,4 @@ TEST(SharedSlice, Hands) { } } } +#endif diff --git a/tdutils/test/log.cpp b/tdutils/test/log.cpp index 4d2762218..5a771a708 100644 --- a/tdutils/test/log.cpp +++ b/tdutils/test/log.cpp @@ -22,6 +22,9 @@ // LOG uses thread local LogInterface // void append(CSlice slice, int log_level); +char disable_linker_warning_about_empty_file_tdutils_test_log_cpp TD_UNUSED; + +#if !TD_THREAD_UNSUPPORTED template class LogBenchmark : public td::Benchmark { public: @@ -125,3 +128,4 @@ TEST(Log, TsLogger) { return td::make_unique(); }); } +#endif diff --git a/test/main.cpp b/test/main.cpp index c0f31cea6..e10b116d9 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -30,8 +30,9 @@ int main(int argc, char **argv) { } #if TD_EMSCRIPTEN emscripten_set_main_loop( - [&runner] { - if (!runner.run_all_step()) { + [] { + td::TestsRunner &default_runner = td::TestsRunner::get_default(); + if (!default_runner.run_all_step()) { emscripten_cancel_main_loop(); } },