[K/N] Move ClearCurrentThreadData() out of TestSupport
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user