Minor, optimize newly added tests on unsigned intrinsics

Remove "JVM_TARGET: 1.6" directive from box tests and remove tests with
JVM target 1.8. By default, box tests are run with JVM target 1.6, and
there's an additional configuration `codegenTarget8Jvm8Test` that runs
all box tests with JVM target 1.8.

Also, remove box tests with JVM target 1.6. They aren't needed because
even if we manage to generate incorrect bytecode with target 1.6, the
corresponding box tests will catch that
This commit is contained in:
Alexander Udalov
2019-04-25 14:21:35 +02:00
parent f392b027fa
commit a53fa0dfbf
25 changed files with 92 additions and 502 deletions

View File

@@ -1,16 +0,0 @@
// JVM_TARGET: 1.6
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
val ua = 1234U
val ub = 5678U
fun box(): String {
if (ua.compareTo(ub) > 0) {
throw AssertionError()
}
return "OK"
}
// 1 INVOKESTATIC kotlin/UnsignedKt.uintCompare

View File

@@ -1,16 +0,0 @@
// JVM_TARGET: 1.6
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
val ua = 1234U
val ub = 5678U
val u = ua * ub
fun box(): String {
val div = u / ua
if (div != ub) throw AssertionError("$div")
return "OK"
}
// 1 INVOKESTATIC kotlin/UnsignedKt.uintDivide

View File

@@ -1,17 +0,0 @@
// JVM_TARGET: 1.6
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
val ua = 1234U
val ub = 5678U
val uc = 3456U
val u = ua * ub + uc
fun box(): String {
val rem = u % ub
if (rem != uc) throw AssertionError("$rem")
return "OK"
}
// 1 kotlin/UnsignedKt.uintRemainder

View File

@@ -1,16 +0,0 @@
// JVM_TARGET: 1.6
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
val ua = 1234UL
val ub = 5678UL
fun box(): String {
if (ua.compareTo(ub) > 0) {
throw AssertionError()
}
return "OK"
}
// 1 INVOKESTATIC kotlin/UnsignedKt.ulongCompare

View File

@@ -1,16 +0,0 @@
// JVM_TARGET: 1.6
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
val ua = 1234UL
val ub = 5678UL
val u = ua * ub
fun box(): String {
val div = u / ua
if (div != ub) throw AssertionError("$div")
return "OK"
}
// 1 INVOKESTATIC kotlin/UnsignedKt.ulongDivide

View File

@@ -1,17 +0,0 @@
// JVM_TARGET: 1.6
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
val ua = 1234UL
val ub = 5678UL
val uc = 3456UL
val u = ua * ub + uc
fun box(): String {
val rem = u % ub
if (rem != uc) throw AssertionError("$rem")
return "OK"
}
// 1 kotlin/UnsignedKt.ulongRemainder