File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ TEST_F (MessageManagerTests, Existence)
6363#if ! YUP_EMSCRIPTEN
6464 auto messageThreadId = mm->getCurrentMessageThread ();
6565
66- std::thread ([messageThreadId]
66+ auto t = std::thread ([messageThreadId]
6767 {
6868 auto mmt = MessageManager::getInstance ();
6969 EXPECT_EQ (messageThreadId, mmt->getCurrentMessageThread ());
@@ -72,7 +72,10 @@ TEST_F (MessageManagerTests, Existence)
7272 EXPECT_FALSE (MessageManager::existsAndIsCurrentThread ());
7373 EXPECT_FALSE (mmt->currentThreadHasLockedMessageManager ());
7474 EXPECT_FALSE (MessageManager::existsAndIsLockedByCurrentThread ());
75- }).join ();
75+ });
76+
77+ if (t.joinable ())
78+ t.join ();
7679#endif
7780}
7881
@@ -91,18 +94,19 @@ TEST_F (MessageManagerTests, CallAsync)
9194}
9295
9396#if ! YUP_EMSCRIPTEN
94- TEST_F (MessageManagerTests, CallFunctionOnMessageThread )
97+ TEST_F (MessageManagerTests, DISABLED_CallFunctionOnMessageThread )
9598{
9699 int called = 0 ;
97100
98101 auto t = std::thread ([&]
99102 {
103+ // clang-format off
100104 auto result = mm->callFunctionOnMessageThread (+[] (void * data) -> void *
101105 {
102106 *reinterpret_cast <int *> (data) = 42 ;
103107 return nullptr ;
104- },
105- ( void *) &called);
108+ }, ( void *) &called);
109+ // clang-format on
106110
107111 EXPECT_EQ (result, nullptr );
108112 });
You can’t perform that action at this time.
0 commit comments