Skip to content

Commit f8b3c44

Browse files
mareklangiewiczelizarov
authored andcommitted
Fix TestBase example in kdoc
1 parent cc3d8c4 commit f8b3c44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kotlinx-coroutines-core/jvm/test/TestBase.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ public actual val stressTestMultiplier = stressTestMultiplierSqrt * stressTestMu
3131
* thread can be written. Use it like this:
3232
*
3333
* ```
34-
* class MyTest {
34+
* class MyTest : TestBase() {
3535
* @Test
36-
* fun testSomething() = runBlocking<Unit> { // run in the context of the main thread
36+
* fun testSomething() = runBlocking { // run in the context of the main thread
3737
* expect(1) // initiate action counter
38-
* val job = launch(context) { // use the context of the main thread
38+
* launch { // use the context of the main thread
3939
* expect(3) // the body of this coroutine in going to be executed in the 3rd step
4040
* }
41-
* expect(2) // launch just scheduled coroutine for exectuion later, so this line is executed second
41+
* expect(2) // launch just scheduled coroutine for execution later, so this line is executed second
4242
* yield() // yield main thread to the launched job
4343
* finish(4) // fourth step is the last one. `finish` must be invoked or test fails
4444
* }

0 commit comments

Comments
 (0)