1 /* 2 * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 package kotlinx.coroutines.test.internal 6 import kotlinx.coroutines.* 7 8 @Suppress("INVISIBLE_MEMBER") getTestMainDispatchernull9internal actual fun Dispatchers.getTestMainDispatcher(): TestMainDispatcher = 10 when (val mainDispatcher = Main) { 11 is TestMainDispatcher -> mainDispatcher 12 else -> TestMainDispatcher(mainDispatcher).also { injectMain(it) } 13 } 14