Remove tests on -Xuse-ir compiler flag

This flag is going to be removed because old backend is not supported
anymore, therefore there's no need to test it.
This commit is contained in:
Alexander Udalov
2023-05-19 16:54:29 +02:00
committed by Space Team
parent 22096cec3c
commit bb4bb58453
61 changed files with 24 additions and 429 deletions
@@ -1,5 +1,4 @@
$TESTDATA_DIR$/simple.kt
-d
$TEMP_DIR$
-Xuse-ir
-Xabi-stability=unknown
-4
View File
@@ -1,4 +0,0 @@
$TESTDATA_DIR$/inlineCycle.kt
-d
$TEMP_DIR$
-Xuse-ir
-7
View File
@@ -1,7 +0,0 @@
compiler/testData/cli/jvm/inlineCycle.kt:2:5: error: the 'b' invocation is a part of inline cycle
b(q)
^
compiler/testData/cli/jvm/inlineCycle.kt:18:5: error: the 'a' invocation is a part of inline cycle
a(p)
^
COMPILATION_ERROR
-8
View File
@@ -1,8 +0,0 @@
$TESTDATA_DIR$/simple.kt
-d
$TEMP_DIR$
-language-version
1.4
-api-version
1.4
-Xuse-ir
-2
View File
@@ -1,2 +0,0 @@
warning: language version 1.4 is deprecated and its support will be removed in a future version of Kotlin
OK
-13
View File
@@ -1,13 +0,0 @@
// This test checks that with -language-version 1.4 we're using the old JVM backend,
// and with -language-version 1.5 -- the new JVM IR backend.
// JVM IR doesn't produce classes for local functions, so the test checks which backend
// is used by asserting that the file for the anonymous class does or doesn't exist.
// Feel free to remove both _1_4 and _1_5 tests as soon as either the old JVM backend
// or LV 1.4 is removed, whichever happens earlier.
class C {
fun test() {
fun local() {}
}
}
-5
View File
@@ -1,5 +0,0 @@
$TESTDATA_DIR$/jvmIrByDefault.kt
-d
$TEMP_DIR$
-language-version
1.4
-2
View File
@@ -1,2 +0,0 @@
warning: language version 1.4 is deprecated and its support will be removed in a future version of Kotlin
OK
-1
View File
@@ -1 +0,0 @@
// EXISTS: C$test$1.class
-5
View File
@@ -1,5 +0,0 @@
$TESTDATA_DIR$/jvmIrByDefault.kt
-d
$TEMP_DIR$
-language-version
1.5
-2
View File
@@ -1,2 +0,0 @@
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
OK
-1
View File
@@ -1 +0,0 @@
// ABSENT: C$test$1.class
-1
View File
@@ -1,5 +1,4 @@
-d
$TEMP_DIR$
-Xuse-ir
-Xverbose-phases=qz,qq
$TESTDATA_DIR$/simple.kt
-5
View File
@@ -1,5 +0,0 @@
$TESTDATA_DIR$/nonLocalDisabled.kt
-Xno-inline
-d
$TEMP_DIR$
-Xuse-ir
-7
View File
@@ -1,7 +0,0 @@
compiler/testData/cli/jvm/nonLocalDisabled.kt:3:9: error: non-local returns are not allowed with inlining disabled
return
^
compiler/testData/cli/jvm/nonLocalDisabled.kt:7:9: error: non-local returns are not allowed with inlining disabled
return@a
^
COMPILATION_ERROR
@@ -1,10 +0,0 @@
package a
import kotlin.reflect.KClass
interface A {
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE_PARAMETER)
annotation class Anno(val value: String)
}
annotation class K(val klass: KClass<*>)
@@ -1,10 +0,0 @@
package b
import a.*
@A.Anno("B")
interface B {
@A.Anno("foo")
@K(A.Anno::class)
fun <@A.Anno("T") T> foo(t: T) = t
}
@@ -1,8 +0,0 @@
package c
import b.B
// There should be _no_ error despite the fact that B and B#foo are annotated with an annotation which cannot be resolved
fun bar(b: B) {
b.foo("")
}
@@ -1,7 +0,0 @@
package test
enum class E { ENTRY }
annotation class Anno(val e: E)
@Anno(E.ENTRY) open class Class
@@ -1,14 +0,0 @@
package test
public final annotation class Anno : kotlin.Annotation {
public constructor Anno(/*0*/ e: test.E)
public final val e: test.E
}
@test.Anno(e = E.ENTRY) public open class Class {
public constructor Class()
}
public final class Subclass : test.Class {
public constructor Subclass()
}
@@ -1 +0,0 @@
Return code: 0
@@ -1,6 +0,0 @@
package Hello
fun main(args: kotlin.Array<kotlin.String>) {
args.size
System.out.println("Hello from fully qualified main!")
}
@@ -1,4 +0,0 @@
OUT:
Hello from fully qualified main!
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,5 +0,0 @@
package Hello
fun main() {
System.out.println("Hello!")
}
@@ -1,4 +0,0 @@
OUT:
Hello!
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,10 +0,0 @@
package Hello
fun main(args: Array<String>) {
args.size
System.out.println("Hello!")
}
fun main() {
System.out.println("Fail")
}
@@ -1,4 +0,0 @@
OUT:
Hello!
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,5 +0,0 @@
package Hello
fun main() {
System.out.println("Hello!")
}
@@ -1,4 +0,0 @@
OUT:
Hello!
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,35 +0,0 @@
package Hello
import kotlin.concurrent.thread
import kotlin.coroutines.suspendCoroutine
import kotlin.coroutines.resume
@kotlin.jvm.Volatile
private var result = ""
@kotlin.jvm.Volatile
private var callback: Function0<Unit>? = null
suspend fun appendAndSuspend(s: String) {
result += s
suspendCoroutine<Unit> { continuation ->
callback = {
continuation.resume(Unit)
}
}
}
suspend fun main(args: Array<String>) {
thread(isDaemon = true) {
while (true) {
val c = callback
c?.invoke()
Thread.sleep(500)
}
}
appendAndSuspend(args[0])
appendAndSuspend(args[1])
println(result)
callback = null
}
@@ -1,4 +0,0 @@
OUT:
OK
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,37 +0,0 @@
@file:JvmMultifileClass
@file:JvmName("Foo")
package Hello
import kotlin.concurrent.thread
import kotlin.coroutines.suspendCoroutine
import kotlin.coroutines.resume
@kotlin.jvm.Volatile
private var result = ""
@kotlin.jvm.Volatile
private var callback: Function0<Unit>? = null
suspend fun appendAndSuspend(s: String) {
result += s
suspendCoroutine<Unit> { continuation ->
callback = {
continuation.resume(Unit)
}
}
}
suspend fun main(args: Array<String>) {
thread(isDaemon = true) {
while (true) {
val c = callback
c?.invoke()
Thread.sleep(500)
}
}
appendAndSuspend(args[0])
appendAndSuspend(args[1])
println(result)
callback = null
}
@@ -1,4 +0,0 @@
OUT:
OK
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,36 +0,0 @@
package Hello
import kotlin.concurrent.thread
import kotlin.coroutines.suspendCoroutine
import kotlin.coroutines.resume
import kotlin.reflect.jvm.javaMethod
@kotlin.jvm.Volatile
private var result = ""
@kotlin.jvm.Volatile
private var callback: Function0<Unit>? = null
suspend fun appendAndSuspend(s: String) {
result += s
suspendCoroutine<Unit> { continuation ->
callback = {
continuation.resume(Unit)
}
}
}
suspend fun main() {
thread(isDaemon = true) {
while (true) {
val c = callback
c?.invoke()
Thread.sleep(500)
}
}
appendAndSuspend("O")
appendAndSuspend("K")
println(result)
callback = null
}
@@ -1,4 +0,0 @@
OUT:
OK
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,6 +0,0 @@
package Hello
fun main(vararg args: kotlin.String) {
args.size
System.out.println("Hello from vararg main!")
}
@@ -1,4 +0,0 @@
OUT:
Hello from vararg main!
Return code: 0
@@ -1 +0,0 @@
Return code: 0
@@ -1,10 +0,0 @@
package Hello
suspend fun f(o: String, k: String): String {
return o + k
}
suspend fun main(args: Array<String>) {
val result = f(args[0], args[1])
println(result)
}
@@ -1,4 +0,0 @@
OUT:
OK
Return code: 0