FIR: Update integer literal-related tests
They started failing once we began reporting diagnostics from completion ^KT-46419 Relates
This commit is contained in:
committed by
teamcityserver
parent
42d387925d
commit
cd401b5b8a
+2
-2
@@ -1,6 +1,6 @@
|
||||
var invokeOrder: String = ""
|
||||
|
||||
fun test(x: Double = { invokeOrder += "x"; 1.0 }(), a: String, y: Long = { invokeOrder += "y"; 1 }(), b: String): String {
|
||||
fun test(x: Double = { invokeOrder += "x"; 1.0 }(), a: String, y: Long = { invokeOrder += "y"; 1L }(), b: String): String {
|
||||
return "" + x.toInt() + a + b + y;
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@ fun box(): String {
|
||||
if (invokeOrder != "KOxy" || funResult != "1OK1") return "fail: $invokeOrder != KOxy or $funResult != 1OK1"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a1: Byte = 1.plus(1)
|
||||
val a2: Short = 1.plus(1)
|
||||
@@ -18,4 +20,4 @@ fun box(): String {
|
||||
if (a8 != 1) return "fail 8"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a1: Byte? = 1.plus(1)
|
||||
val a2: Short? = 1.plus(1)
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a1: Byte = 1 + 1
|
||||
val a2: Short = 1 + 1
|
||||
@@ -18,4 +20,4 @@ fun box(): String {
|
||||
if (a8 != 1) return "fail 8"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a1: Byte? = 1 + 1
|
||||
val a2: Short? = 1 + 1
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a: Long = 2147483647 + 1
|
||||
if (a != -2147483648L) return "fail: in this case we should add to ints and than cast the result to long - overflow expected"
|
||||
@@ -11,4 +13,4 @@ fun box(): String {
|
||||
if (l4 < l3) return "fail: Long.MIN_VALUE - 1 should overflow to positive."
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// SKIP_JDK6
|
||||
// FULL_JDK
|
||||
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a1: Byte = 1.unaryMinus()
|
||||
val a2: Short = 1.unaryMinus()
|
||||
@@ -14,4 +16,4 @@ fun box(): String {
|
||||
if (a6 != -1f) return "fail 6"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a1: Byte? = 1.unaryMinus()
|
||||
val a2: Short? = 1.unaryMinus()
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
val a: Long = -(1 shl 31)
|
||||
if (a != -2147483648L) return "fail: in this case we should add to ints and than cast the result to long - overflow expected"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
val a: Byte = 1 + 10
|
||||
|
||||
// 1 BIPUSH 11
|
||||
// 1 BIPUSH 11
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
val a: Short = 1 + 255
|
||||
|
||||
// 1 SIPUSH 256
|
||||
// 1 SIPUSH 256
|
||||
|
||||
Reference in New Issue
Block a user