Make assertFailsWith common

Because headers cannot have default parameters.
This leads to less effective implementation in JVM.
This commit is contained in:
Ilya Gorbunov
2017-03-24 21:35:56 +03:00
parent 609355a311
commit f8ebe5593f
3 changed files with 16 additions and 1 deletions
@@ -25,6 +25,7 @@ fun todo(block: () -> Any) {
println("TODO at " + block)
}
/*
/** Asserts that a [block] fails with a specific exception of type [T] being thrown.
* Since inline method doesn't allow to trace where it was invoked, it is required to pass a [message] to distinguish this method call from others.
*/
@@ -35,6 +36,7 @@ inline fun <reified T : Throwable> assertFailsWith(message: String? = null, noin
assertTrue(exception is T, "${messagePrefix}An exception thrown is not of the expected type: $exception")
return exception as T
}
*/
var _asserter: Asserter = QUnitAsserter()