kotlin.test: 'fail' returns Nothing, 'assertFails' returns Throwable (not nullable).

Js tests now fail at the first failed assertion.
#KT-10289 Fixed
#KT-10369 Fixed
This commit is contained in:
Ilya Gorbunov
2016-01-13 04:16:42 +03:00
parent 8fdd8179b9
commit f91c01919b
9 changed files with 36 additions and 20 deletions
@@ -35,7 +35,9 @@ object JUnitAsserter : Asserter {
Assert.assertNull(message ?: "actual value is not null", actual)
}
override fun fail(message : String?) {
override fun fail(message : String?): Nothing {
Assert.fail(message)
// should not get here
throw AssertionError(message)
}
}