Files
kotlin/compiler/testData/codegen/extensionFunctions/shared.kt
2011-12-20 22:56:13 +04:00

14 lines
264 B
Kotlin

fun <T> T.mustBe(t : T) {
assert("$this must be $t") {this == t}
}
inline fun assert(message : String, condition : () -> Boolean) {
if (!condition())
throw AssertionError(message)
}
fun box() : String {
"lala" mustBe "lala"
return "OK"
}