File tree Expand file tree Collapse file tree 7 files changed +11
-35
lines changed Expand file tree Collapse file tree 7 files changed +11
-35
lines changed Original file line number Diff line number Diff line change 1+ import org.jetbrains.kotlin.gradle.plugin.mpp.*
2+
13/*
24 * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
35 */
@@ -10,4 +12,10 @@ val experimentalAnnotations = listOf(
1012
1113kotlin {
1214 sourceSets.all { configureMultiplatform() }
15+
16+ targets.withType(KotlinNativeTargetWithTests ::class .java).configureEach {
17+ val tests = binaries.getTest(" DEBUG" )
18+ tests.optimized = true
19+ tests.binaryOptions[" memoryModel" ] = " experimental"
20+ }
1321}
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ class RunTestTest {
7171
7272 /* * Tests that a dispatch timeout of `0` will fail the test if there are some dispatches outside the scheduler. */
7373 @Test
74- @NoNative // TODO: timeout leads to `Cannot execute task because event loop was shut down` on Native
7574 fun testRunTestWithZeroTimeoutWithUncontrolledDispatches () = testResultMap({ fn ->
7675 assertFailsWith<UncompletedCoroutinesError > { fn() }
7776 }) {
@@ -86,7 +85,6 @@ class RunTestTest {
8685
8786 /* * Tests that too low of a dispatch timeout causes crashes. */
8887 @Test
89- @NoNative // TODO: timeout leads to `Cannot execute task because event loop was shut down` on Native
9088 fun testRunTestWithSmallTimeout () = testResultMap({ fn ->
9189 assertFailsWith<UncompletedCoroutinesError > { fn() }
9290 }) {
@@ -112,7 +110,7 @@ class RunTestTest {
112110 it()
113111 fail(" unreached" )
114112 } catch (e: UncompletedCoroutinesError ) {
115- assertTrue(( e.message ? : " " ).contains( name1) )
113+ assertContains( e.message ? : " " , name1)
116114 assertFalse((e.message ? : " " ).contains(name2))
117115 }
118116 }) {
@@ -162,7 +160,6 @@ class RunTestTest {
162160
163161 /* * Tests uncaught exceptions being suppressed by the dispatch timeout error. */
164162 @Test
165- @NoNative // TODO: timeout leads to `Cannot execute task because event loop was shut down` on Native
166163 fun testRunTestTimingOutAndThrowing () = testResultMap({ fn ->
167164 try {
168165 fn()
Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ class StandardTestDispatcherTest: OrderedExecutionTestBase() {
6464
6565 /* * Tests that the [TestCoroutineScheduler] used for [Dispatchers.Main] gets used by default. */
6666 @Test
67- @NoNative
6867 fun testSchedulerReuse () {
6968 val dispatcher1 = StandardTestDispatcher ()
7069 Dispatchers .setMain(dispatcher1)
@@ -76,4 +75,4 @@ class StandardTestDispatcherTest: OrderedExecutionTestBase() {
7675 }
7776 }
7877
79- }
78+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import kotlinx.coroutines.test.internal.*
88import kotlin.coroutines.*
99import kotlin.test.*
1010
11- @NoNative
1211class TestDispatchersTest : OrderedExecutionTestBase () {
1312
1413 @BeforeTest
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ class TestScopeTest {
5454
5555 /* * Part of [testCreateProvidesScheduler], disabled for Native */
5656 @Test
57- @NoNative
5857 fun testCreateReusesScheduler () {
5958 // Reuses the scheduler of `Dispatchers.Main`
6059 run {
Original file line number Diff line number Diff line change @@ -153,7 +153,6 @@ class UnconfinedTestDispatcherTest {
153153
154154 /* * Tests that the [TestCoroutineScheduler] used for [Dispatchers.Main] gets used by default. */
155155 @Test
156- @NoNative
157156 fun testSchedulerReuse () {
158157 val dispatcher1 = StandardTestDispatcher ()
159158 Dispatchers .setMain(dispatcher1)
@@ -165,4 +164,4 @@ class UnconfinedTestDispatcherTest {
165164 }
166165 }
167166
168- }
167+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments