Enable bytecode text tests for the JVM_IR backend.

This commit is contained in:
Mads Ager
2018-12-21 13:22:56 +01:00
committed by Mikhael Bogdanov
parent d1efac617d
commit 3a11322506
347 changed files with 3651 additions and 0 deletions
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun test(x: String?) {
if (x !is String) return
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun test(x: String?) {
if (x == null) return
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// FILE: j/J.java
package j;
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// FILE: j/J.java
package j;
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// FILE: j/J.java
package j;
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun test1() {
val a = null
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// FILE: test.kt
fun test1() {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun test1() {
val a = Unit
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// FILE: test.kt
fun test1(): String {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun test() {
val value = System.getProperty("key")
if (value != null) {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun almostAlwaysTrue() = true
fun runNoInline(f: () -> Unit) = f()
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun almostAlwaysTrue() = true
fun test() {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun foo(s: String) = s as CharSequence
// 0 IFNULL
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
fun test(s: String) = s?.length
// 0 IFNULL
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
inline fun <reified T> Any?.isa() = this is T
// 1 INSTANCEOF
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JVM_IR
inline fun <reified T> isNullable() = null is T
// 1 INSTANCEOF