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 4
4
5
5
package kotlinx.coroutines.experimental
6
6
7
+ import kotlinx.coroutines.experimental.internal.*
7
8
import org.junit.*
8
9
import kotlinx.coroutines.experimental.scheduling.*
9
10
import java.util.concurrent.atomic.*
10
11
12
+ private val VERBOSE = systemProp(" test.verbose" , false )
13
+
11
14
/* *
12
15
* Base class for tests, so that tests for predictable scheduling of actions in multiple coroutines sharing a single
13
16
* thread can be written. Use it like this:
@@ -74,6 +77,7 @@ public actual open class TestBase actual constructor() {
74
77
*/
75
78
public actual fun expect (index : Int ) {
76
79
val wasIndex = actionIndex.incrementAndGet()
80
+ if (VERBOSE ) println (" expect($index ), wasIndex=$wasIndex " )
77
81
check(index == wasIndex) { " Expecting action index $index but it is actually $wasIndex " }
78
82
}
79
83
You can’t perform that action at this time.
0 commit comments