mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 00:21:28 +00:00
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:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user