Skip to content

Commit af49d00

Browse files
committed
Fix build on Native
1 parent 9d2a4c8 commit af49d00

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

kotlinx-coroutines-test/common/test/StandardTestDispatcherTest.kt

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class StandardTestDispatcherTest: OrderedExecutionTestBase() {
6464

6565
/** Tests that the [TestCoroutineScheduler] used for [Dispatchers.Main] gets used by default. */
6666
@Test
67+
@NoNative
6768
fun testSchedulerReuse() {
6869
val dispatcher1 = StandardTestDispatcher()
6970
Dispatchers.setMain(dispatcher1)

kotlinx-coroutines-test/common/test/TestDispatchersTest.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import kotlinx.coroutines.test.internal.*
88
import kotlin.coroutines.*
99
import kotlin.test.*
1010

11+
@NoNative
1112
class TestDispatchersTest: OrderedExecutionTestBase() {
1213

1314
@BeforeTest
@@ -21,8 +22,8 @@ class TestDispatchersTest: OrderedExecutionTestBase() {
2122
}
2223

2324
/** Tests that asynchronous execution of tests does not happen concurrently with [AfterTest]. */
24-
@NoJs
2525
@Test
26+
@NoJs
2627
fun testMainMocking() = runTest {
2728
val mainAtStart = TestMainDispatcher.currentTestDispatcher
2829
assertNotNull(mainAtStart)

kotlinx-coroutines-test/common/test/TestScopeTest.kt

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ class TestScopeTest {
4848
assertSame(scheduler, scope.coroutineContext[TestCoroutineScheduler])
4949
assertSame(dispatcher, scope.coroutineContext[ContinuationInterceptor])
5050
}
51+
}
52+
53+
/** Part of [testCreateProvidesScheduler], disabled for Native */
54+
@Test
55+
@NoNative
56+
fun testCreateReusesScheduler() {
5157
// Reuses the scheduler of `Dispatchers.Main`
5258
run {
5359
val scheduler = TestCoroutineScheduler()

kotlinx-coroutines-test/common/test/UnconfinedTestDispatcherTest.kt

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ class UnconfinedTestDispatcherTest {
153153

154154
/** Tests that the [TestCoroutineScheduler] used for [Dispatchers.Main] gets used by default. */
155155
@Test
156+
@NoNative
156157
fun testSchedulerReuse() {
157158
val dispatcher1 = StandardTestDispatcher()
158159
Dispatchers.setMain(dispatcher1)

0 commit comments

Comments
 (0)