From ac0f612781ce5a223dc7e553bdf51e5013c21601 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Tue, 11 Dec 2018 14:53:58 +0300 Subject: [PATCH] Make kotlin.test asserter be ThreadLocal --- .../common/src/main/kotlin/kotlin/test/Assertions.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt b/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt index 33cf18b0248..f4e6863c806 100644 --- a/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt +++ b/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/Assertions.kt @@ -14,6 +14,7 @@ package kotlin.test import kotlin.contracts.* import kotlin.internal.* +import kotlin.native.concurrent.ThreadLocal import kotlin.reflect.KClass /** @@ -23,6 +24,7 @@ val asserter: Asserter get() = _asserter ?: lookupAsserter() /** Used to override current asserter internally */ +@ThreadLocal internal var _asserter: Asserter? = null /** Asserts that the given [block] returns `true`. */