• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 @file:OptIn(ExperimentalCoroutinesApi::class)
2 
3 import org.junit.*
4 import kotlinx.coroutines.*
5 import kotlinx.coroutines.debug.*
6 import org.junit.Test
7 import java.io.*
8 
9 class DebugAgentTest {
10 
11     @Test
<lambda>null12     fun testAgentDumpsCoroutines() = runBlocking {
13         val baos = ByteArrayOutputStream()
14         DebugProbes.dumpCoroutines(PrintStream(baos))
15         // if the agent works, then dumps should contain something,
16         // at least the fact that this test is running.
17         Assert.assertTrue(baos.toString().contains("testAgentDumpsCoroutines"))
18     }
19 
20 }
21