| 10 | using ::babylon::EnumerableThreadLocal; |
| 11 | |
| 12 | TEST(thread_local_storage, each_live_thread_has_separate_local_storage) { |
| 13 | EnumerableThreadLocal<::std::string> storage; |
| 14 | auto* v1 = &storage.local(); |
| 15 | ::std::thread([&] { |
| 16 | ASSERT_NE(v1, &storage.local()); |
| 17 | }).join(); |
| 18 | } |
| 19 | |
| 20 | TEST(thread_local_storage, new_thread_may_reuse_storage) { |
| 21 | EnumerableThreadLocal<::std::string> storage; |
nothing calls this directly
no test coverage detected