| 11 | using namespace base; |
| 12 | |
| 13 | TEST(Thread, SetGetName) |
| 14 | { |
| 15 | // By default the thread name can be empty (Windows, macOS) or the |
| 16 | // process name (Linux). |
| 17 | #if LAF_LINUX |
| 18 | EXPECT_EQ("thread_tests", this_thread::get_name()); |
| 19 | #else |
| 20 | EXPECT_EQ("", this_thread::get_name()); |
| 21 | #endif |
| 22 | |
| 23 | this_thread::set_name("main"); |
| 24 | EXPECT_EQ("main", this_thread::get_name()); |
| 25 | |
| 26 | this_thread::set_name("testing"); |
| 27 | EXPECT_EQ("testing", this_thread::get_name()); |
| 28 | } |
| 29 | |
| 30 | TEST(Thread, NameLimits) |
| 31 | { |
nothing calls this directly
no outgoing calls
no test coverage detected