Fix thread name test, make sure it can't pass when it's getting the name of the wrong thread

This commit is contained in:
Sebastian Messmer 2019-02-28 00:02:08 -08:00
parent a8aeec2f75
commit d26f1faca6

View File

@ -53,6 +53,7 @@ TEST(ThreadDebuggingTest_ThreadName, givenChildThread_whenGettingFromOutside_the
}); });
nameIsSet.wait(); nameIsSet.wait();
set_thread_name("outer_thread_name"); // just to make sure the next line doesn't read the outer thread name
string name = get_thread_name(&child); string name = get_thread_name(&child);
EXPECT_EQ("my_thread_name", name); EXPECT_EQ("my_thread_name", name);