https://kotlinlang.org logo
#stdlib
Title
v

voddan

12/02/2015, 6:47 AM
I just thought through the
assertFailsWith<T>(class: KClass<T> = T)
syntax. For this to be convenient Kotlin will have to change its rules for default parameters. By the java convention
class
parameter should go first. But in kotlin all parameters after a default one must be named. So the usage would be
assertFailsWith<MyClass>(message="one word too long")
.