Fix running stdlib tests in worker on Native

Add `@SharedImmutable` or `@ThreadLocal` where required.
This commit is contained in:
Svyatoslav Scherbina
2020-12-10 12:09:35 +03:00
parent 8f4e4a4d40
commit 0f4173cdfa
5 changed files with 32 additions and 0 deletions
@@ -6,6 +6,7 @@
package test.random
import kotlin.math.*
import kotlin.native.concurrent.ThreadLocal
import kotlin.random.*
import kotlin.test.*
@@ -566,6 +567,7 @@ class DefaultRandomSmokeTest : RandomSmokeTest() {
override val subject: Random get() = Random
}
@ThreadLocal
private val seededRandomSmokeTestSubject = Random(Random.nextInt().also { println("Seed: $it") })
class SeededRandomSmokeTest : RandomSmokeTest() {