• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 package kotlinx.coroutines.test
5 
6 import kotlinx.coroutines.*
7 import kotlinx.coroutines.debug.internal.*
8 
9 @Suppress("ACTUAL_WITHOUT_EXPECT")
10 public actual typealias TestResult = Unit
11 
createTestResultnull12 internal actual fun createTestResult(testProcedure: suspend CoroutineScope.() -> Unit) {
13     runBlocking {
14         testProcedure()
15     }
16 }
17 
dumpCoroutinesnull18 internal actual fun dumpCoroutines() {
19     @Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
20     if (DebugProbesImpl.isInstalled) {
21         DebugProbesImpl.install()
22         try {
23             DebugProbesImpl.dumpCoroutines(System.err)
24             System.err.flush()
25         } finally {
26             DebugProbesImpl.uninstall()
27         }
28     }
29 }
30