Files
kotlin/compiler/testData/codegen/box/extensionFunctions/shared.kt
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +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"
}