[K/N] Move ClearCurrentThreadData() out of TestSupport

This commit is contained in:
Pavel Kunyavskiy
2021-06-22 11:10:27 +03:00
committed by Space
parent 65bebd3058
commit 4c2d518cf5
2 changed files with 2 additions and 5 deletions
@@ -57,7 +57,7 @@ extern "C" void Kotlin_TestSupport_AssertClearGlobalState() {
void kotlin::DeinitMemoryForTests(MemoryState* memoryState) { void kotlin::DeinitMemoryForTests(MemoryState* memoryState) {
DeinitMemory(memoryState, false); DeinitMemory(memoryState, false);
mm::ThreadRegistry::TestSupport::ClearCurrentThreadData(); mm::ThreadRegistry::ClearCurrentThreadData();
} }
std::ostream& kotlin::operator<<(std::ostream& stream, ThreadState state) { std::ostream& kotlin::operator<<(std::ostream& stream, ThreadState state) {
@@ -43,10 +43,7 @@ public:
bool IsCurrentThreadRegistered() const noexcept { return currentThreadDataNode_ != nullptr; } bool IsCurrentThreadRegistered() const noexcept { return currentThreadDataNode_ != nullptr; }
class TestSupport { static void ClearCurrentThreadData() { currentThreadDataNode_ = nullptr; }
public:
static void ClearCurrentThreadData() { currentThreadDataNode_ = nullptr; }
};
private: private:
friend class GlobalData; friend class GlobalData;