Get rid of reduntant jvm parts in tests

This commit is contained in:
Mikhael Bogdanov
2018-12-21 13:34:40 +01:00
parent f59b6a350f
commit d1efac617d
10 changed files with 22 additions and 34 deletions
@@ -1,13 +1,13 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS_IR, NATIVE
// WITH_RUNTIME
import kotlin.test.assertTrue
fun check(x: Any?): Boolean {
if (x is Int) {
return x in 239..240
}
throw java.lang.AssertionError()
throw AssertionError()
}
fun check(x: Any?, l: Any?, r: Any?): Boolean {
@@ -15,14 +15,14 @@ fun check(x: Any?, l: Any?, r: Any?): Boolean {
return x in l..r
}
throw java.lang.AssertionError()
throw AssertionError()
}
fun box(): String {
assert(check(239))
assert(check(239, 239, 240))
assert(!check(238))
assert(!check(238, 239, 240))
assertTrue(check(239))
assertTrue(check(239, 239, 240))
assertTrue(!check(238))
assertTrue(!check(238, 239, 240))
return "OK"
}