Minor: Fix some test cases
This commit is contained in:
committed by
Alexander Udalov
parent
6e9ee2a46c
commit
3659b517bb
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
class A
|
||||
|
||||
fun foo(x: Any?) {}
|
||||
@@ -11,13 +10,19 @@ fun box() {
|
||||
z!!
|
||||
|
||||
foo(1 as java.lang.Integer)
|
||||
|
||||
|
||||
val y: Any? = if (1 == 1) x else A()
|
||||
y!!
|
||||
}
|
||||
|
||||
// 0 IFNULL
|
||||
// 0 checkNotNull
|
||||
// 0 ATHROW
|
||||
|
||||
// JVM_TEMPLATES:
|
||||
// 1 IFNONNULL
|
||||
// 1 throwNpe
|
||||
// 0 ATHROW
|
||||
// 0 checkNotNull
|
||||
|
||||
// JVM_IR_TEMPLATES:
|
||||
// 0 IFNONULL
|
||||
// 0 throwNpe
|
||||
|
||||
Vendored
+8
-4
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
class A
|
||||
fun box() {
|
||||
val x: A? = A()
|
||||
@@ -9,12 +8,17 @@ fun box() {
|
||||
else {
|
||||
y = null
|
||||
}
|
||||
|
||||
|
||||
y!!
|
||||
}
|
||||
|
||||
// 0 IFNULL
|
||||
// 1 IFNONNULL
|
||||
// 1 throwNpe
|
||||
// 0 ATHROW
|
||||
// 0 checkNotNull
|
||||
// 1 throwNpe
|
||||
|
||||
// JVM_TEMPLATES:
|
||||
// 1 IFNONNULL
|
||||
|
||||
// JVM_IR_TEMPLATES:
|
||||
// 0 IFNONNULL
|
||||
|
||||
+12
-11
@@ -1,15 +1,16 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
fun main() {
|
||||
false.toString()
|
||||
1.toByte().toString()
|
||||
1.toShort().toString()
|
||||
1.toString()
|
||||
1L.toString()
|
||||
1.0F.toString()
|
||||
1.0.toString()
|
||||
'c'.toString()
|
||||
}
|
||||
fun boolConst() = false.toString()
|
||||
fun byteConst() = 1.toByte().toString()
|
||||
fun shortConst() = 1.toShort().toString()
|
||||
fun intConst() = 1.toString()
|
||||
fun longConst() = 1L.toString()
|
||||
fun floatConst() = 1.0F.toString()
|
||||
fun doubleConst() = 1.0.toString()
|
||||
fun charConst() = 'c'.toString()
|
||||
|
||||
/*Check that all "valueOf" are String ones and there is no boxing*/
|
||||
// JVM_TEMPLATES:
|
||||
// 8 valueOf
|
||||
// 8 INVOKESTATIC java/lang/String.valueOf
|
||||
// JVM_IR_TEMPLATES:
|
||||
// 0 valueOf
|
||||
// 8 LDC \"
|
||||
Reference in New Issue
Block a user