Roman Elizarov | a7db8ec | 2017-12-21 22:45:12 +0300 | [diff] [blame] | 1 | /* |
Roman Elizarov | 1f74a2d | 2018-06-29 19:19:45 +0300 | [diff] [blame^] | 2 | * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
Roman Elizarov | a7db8ec | 2017-12-21 22:45:12 +0300 | [diff] [blame] | 3 | */ |
| 4 | |
Roman Elizarov | 8bff72b | 2017-12-20 12:55:38 +0300 | [diff] [blame] | 5 | package kotlinx.coroutines.experimental |
| 6 | |
| 7 | public expect open class TestBase constructor() { |
| 8 | public val isStressTest: Boolean |
| 9 | public val stressTestMultiplier: Int |
| 10 | |
Roman Elizarov | 8bff72b | 2017-12-20 12:55:38 +0300 | [diff] [blame] | 11 | public fun error(message: Any, cause: Throwable? = null): Nothing |
| 12 | public fun expect(index: Int) |
| 13 | public fun expectUnreached() |
| 14 | public fun finish(index: Int) |
| 15 | |
Roman Elizarov | 8bff72b | 2017-12-20 12:55:38 +0300 | [diff] [blame] | 16 | public fun runTest( |
| 17 | expected: ((Throwable) -> Boolean)? = null, |
| 18 | unhandled: List<(Throwable) -> Boolean> = emptyList(), |
| 19 | block: suspend CoroutineScope.() -> Unit |
Roman Elizarov | 4b9ae98 | 2018-01-25 11:51:25 +0300 | [diff] [blame] | 20 | ) |
Roman Elizarov | 8bff72b | 2017-12-20 12:55:38 +0300 | [diff] [blame] | 21 | } |