Update testData for argument nullability assertion tests

This commit is contained in:
Dmitry Petrov
2019-11-22 14:16:03 +03:00
parent fc7783c7dd
commit 89e1941dfd
23 changed files with 34 additions and 44 deletions
@@ -1,8 +1,7 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
// FILE: destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt
import kotlin.test.*
@@ -1,6 +1,5 @@
// !LANGUAGE: +StrictJavaNullabilityAssertions
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: box.kt
@@ -1,5 +1,4 @@
// !LANGUAGE: +StrictJavaNullabilityAssertions
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: box.kt
@@ -1,6 +1,5 @@
// !LANGUAGE: +StrictJavaNullabilityAssertions
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: box.kt
@@ -1,6 +1,5 @@
// !LANGUAGE: +StrictJavaNullabilityAssertions
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: box.kt
@@ -1,6 +1,5 @@
// !LANGUAGE: +StrictJavaNullabilityAssertions
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: box.kt
@@ -1,6 +1,5 @@
// !LANGUAGE: +StrictJavaNullabilityAssertions
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: box.kt
@@ -1,6 +1,5 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM_IR
// FILE: test.kt
fun f(x: String) = "Fail 1"
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: test.kt
// WITH_RUNTIME
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,6 +1,5 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM_IR
// FILE: test.kt
fun f(x: String) = "Fail 1"
@@ -1,8 +1,7 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
// FILE: equalsNull_lv12.kt
import kotlin.test.*
fun box(): String {
@@ -2,7 +2,12 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_EXCEPTION_ON_EXPLICIT_EQUALS_FOR_BOXED_NULL
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
// FILE: equalsNull_withExplicitFlag.kt
// IGNORE_BACKEND: JVM_IR
// JVM_IR supports behavior since Kotlin 1.3,
// and '-Xno-exception-on-explicit-equals-for-boxed-null' is a fallback flag introduced in 1.2.
import kotlin.test.*
fun box(): String {
+2 -2
View File
@@ -12,7 +12,7 @@ FILE fqName:<root> fileName:/equals.kt
VALUE_PARAMETER name:b index:1 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testEquals (a: kotlin.Int, b: kotlin.Int): kotlin.Boolean declared in <root>'
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null
$this: GET_VAR 'a: kotlin.Int declared in <root>.testEquals' type=kotlin.Int origin=null
other: GET_VAR 'b: kotlin.Int declared in <root>.testEquals' type=kotlin.Int origin=null
FUN name:testJEqeqNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean
@@ -24,6 +24,6 @@ FILE fqName:<root> fileName:/equals.kt
FUN name:testJEqualsNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testJEqualsNull (): kotlin.Boolean declared in <root>'
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null
$this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:kotlin.Int? visibility:public [static]' type=kotlin.Int? origin=GET_PROPERTY
other: CONST Null type=kotlin.Nothing? value=null
+2 -2
View File
@@ -12,7 +12,7 @@ FILE fqName:<root> fileName:/equals.kt
VALUE_PARAMETER name:b index:1 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testEquals (a: kotlin.Int, b: kotlin.Int): kotlin.Boolean declared in <root>'
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override] declared in kotlin.Int' type=kotlin.Boolean origin=null
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null
$this: GET_VAR 'a: kotlin.Int declared in <root>.testEquals' type=kotlin.Int origin=null
other: GET_VAR 'b: kotlin.Int declared in <root>.testEquals' type=kotlin.Int origin=null
FUN name:testJEqeqNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean
@@ -24,7 +24,7 @@ FILE fqName:<root> fileName:/equals.kt
FUN name:testJEqualsNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testJEqualsNull (): kotlin.Boolean declared in <root>'
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override] declared in kotlin.Int' type=kotlin.Boolean origin=null
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null
$this: TYPE_OP type=kotlin.Int origin=IMPLICIT_NOTNULL typeOperand=kotlin.Int
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:kotlin.Int? visibility:public [static]' type=kotlin.Int? origin=GET_PROPERTY
other: CONST Null type=kotlin.Nothing? value=null
@@ -2,5 +2,5 @@ FILE fqName:<root> fileName:/implicitCastOnPlatformType.kt
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (): kotlin.String declared in <root>'
CALL 'public open fun getProperty (p0: kotlin.String?): kotlin.String? declared in java.lang.System' type=kotlin.String? origin=null
CALL 'public open fun getProperty (p0: kotlin.String?): kotlin.String? [operator] declared in java.lang.System' type=kotlin.String? origin=null
p0: CONST String type=kotlin.String value="test"
@@ -1,21 +1,21 @@
FILE fqName:<root> fileName:/implicitNotNullInDestructuringAssignment.kt
FUN name:component1 visibility:public modality:FINAL <> ($receiver:<root>.J?) returnType:kotlin.Int
FUN name:component1 visibility:public modality:FINAL <> ($receiver:<root>.J?) returnType:kotlin.Int [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.J?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int [operator] declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:component2 visibility:private modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Int
FUN name:component2 visibility:private modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Int [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.J
BLOCK_BODY
RETURN type=kotlin.Nothing from='private final fun component2 (): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='private final fun component2 (): kotlin.Int [operator] declared in <root>'
CONST Int type=kotlin.Int value=2
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.J? [val]
CALL 'public open fun j (): <root>.J? declared in <root>.J' type=<root>.J? origin=null
CALL 'public open fun j (): <root>.J? [operator] declared in <root>.J' type=<root>.J? origin=null
VAR name:a type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
CALL 'public final fun component1 (): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
$receiver: GET_VAR 'val tmp_0: <root>.J? [val] declared in <root>.test' type=<root>.J? origin=null
VAR name:b type:kotlin.Int [val]
CALL 'private final fun component2 (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
CALL 'private final fun component2 (): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
$receiver: GET_VAR 'val tmp_0: <root>.J? [val] declared in <root>.test' type=<root>.J? origin=null
@@ -1,13 +1,13 @@
FILE fqName:<root> fileName:/implicitNotNullInDestructuringAssignment.kt
FUN name:component1 visibility:public modality:FINAL <> ($receiver:<root>.J?) returnType:kotlin.Int
FUN name:component1 visibility:public modality:FINAL <> ($receiver:<root>.J?) returnType:kotlin.Int [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.J?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int [operator] declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:component2 visibility:private modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Int
FUN name:component2 visibility:private modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Int [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.J
BLOCK_BODY
RETURN type=kotlin.Nothing from='private final fun component2 (): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='private final fun component2 (): kotlin.Int [operator] declared in <root>'
CONST Int type=kotlin.Int value=2
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
@@ -15,9 +15,9 @@ FILE fqName:<root> fileName:/implicitNotNullInDestructuringAssignment.kt
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.J? [val]
CALL 'public open fun j (): <root>.J? declared in <root>.J' type=<root>.J? origin=null
VAR name:a type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>' type=kotlin.Int origin=COMPONENT_N(index=1)
CALL 'public final fun component1 (): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=COMPONENT_N(index=1)
$receiver: GET_VAR 'val tmp_0: <root>.J? [val] declared in <root>.test' type=<root>.J? origin=null
VAR name:b type:kotlin.Int [val]
CALL 'private final fun component2 (): kotlin.Int declared in <root>' type=kotlin.Int origin=COMPONENT_N(index=2)
CALL 'private final fun component2 (): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=COMPONENT_N(index=2)
$receiver: TYPE_OP type=<root>.J origin=IMPLICIT_NOTNULL typeOperand=<root>.J
GET_VAR 'val tmp_0: <root>.J? [val] declared in <root>.test' type=<root>.J? origin=null
@@ -1,14 +1,14 @@
FILE fqName:<root> fileName:/jvmStaticFieldReference.kt
FUN name:testFun visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit [operator] declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
p0: CONST String type=kotlin.String value="testFun"
PROPERTY name:testProp visibility:public modality:FINAL [var]
FUN name:<get-testProp> visibility:public modality:FINAL <> () returnType:kotlin.Any
correspondingProperty: PROPERTY name:testProp visibility:public modality:FINAL [var]
BLOCK_BODY
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit [operator] declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
p0: CONST String type=kotlin.String value="testProp/get"
RETURN type=kotlin.Nothing from='public final fun <get-testProp> (): kotlin.Any declared in <root>'
@@ -17,7 +17,7 @@ FILE fqName:<root> fileName:/jvmStaticFieldReference.kt
correspondingProperty: PROPERTY name:testProp visibility:public modality:FINAL [var]
VALUE_PARAMETER name:value index:0 type:kotlin.Any
BLOCK_BODY
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit [operator] declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
p0: CONST String type=kotlin.String value="testProp/set"
CLASS CLASS name:TestClass modality:FINAL visibility:public superTypes:[kotlin.Any]
@@ -33,7 +33,7 @@ FILE fqName:<root> fileName:/jvmStaticFieldReference.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: BLOCK type=kotlin.Int origin=null
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit [operator] declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
p0: CONST String type=kotlin.String value="TestClass/test"
CONST Int type=kotlin.Int value=42
@@ -46,12 +46,12 @@ FILE fqName:<root> fileName:/jvmStaticFieldReference.kt
receiver: GET_VAR '<this>: <root>.TestClass declared in <root>.TestClass.<get-test>' type=<root>.TestClass origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit [operator] declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
p0: CONST String type=kotlin.String value="TestClass/init"
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override]
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
@@ -5,6 +5,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnPlatformType.kt
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun f (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
s: CALL 'public open fun s (): kotlin.String? declared in <root>.J' type=kotlin.String? origin=null
s: CALL 'public open fun s (): kotlin.String? [operator] declared in <root>.J' type=kotlin.String? origin=null
CALL 'public final fun f (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
s: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:STRING type:kotlin.String? visibility:public [static]' type=kotlin.String? origin=GET_PROPERTY