File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
core/kotlinx-coroutines-core/test Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 44
55package kotlinx.coroutines.experimental
66
7+ import kotlinx.coroutines.experimental.internal.*
78import org.junit.*
89import kotlinx.coroutines.experimental.scheduling.*
910import java.util.concurrent.atomic.*
1011
12+ private val VERBOSE = systemProp(" test.verbose" , false )
13+
1114/* *
1215 * Base class for tests, so that tests for predictable scheduling of actions in multiple coroutines sharing a single
1316 * thread can be written. Use it like this:
@@ -74,6 +77,7 @@ public actual open class TestBase actual constructor() {
7477 */
7578 public actual fun expect (index : Int ) {
7679 val wasIndex = actionIndex.incrementAndGet()
80+ if (VERBOSE ) println (" expect($index ), wasIndex=$wasIndex " )
7781 check(index == wasIndex) { " Expecting action index $index but it is actually $wasIndex " }
7882 }
7983
You can’t perform that action at this time.
0 commit comments