blob: 1c6f651a8611f25ea167db04617322da9b025e3b [file] [log] [blame]
Roman Elizarova7db8ec2017-12-21 22:45:12 +03001/*
Roman Elizarov1f74a2d2018-06-29 19:19:45 +03002 * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
Roman Elizarova7db8ec2017-12-21 22:45:12 +03003 */
4
Roman Elizarov8bff72b2017-12-20 12:55:38 +03005package kotlinx.coroutines.experimental
6
7public expect open class TestBase constructor() {
8 public val isStressTest: Boolean
9 public val stressTestMultiplier: Int
10
Roman Elizarov8bff72b2017-12-20 12:55:38 +030011 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 Elizarov8bff72b2017-12-20 12:55:38 +030016 public fun runTest(
17 expected: ((Throwable) -> Boolean)? = null,
18 unhandled: List<(Throwable) -> Boolean> = emptyList(),
19 block: suspend CoroutineScope.() -> Unit
Roman Elizarov4b9ae982018-01-25 11:51:25 +030020 )
Roman Elizarov8bff72b2017-12-20 12:55:38 +030021}