Remove LANGUAGE_VERSION from non-coroutine codegen tests

Most of these tests used this directive as a way to opt in to a new
language feature, and most of those features are already stable for a
long time, so no opt-in is needed. Some other tests used the directive
to opt out from a language feature, replace those by the `LANGUAGE`
directive. One test used the directive to test behavior that actually
depended on the API version; use `API_VERSION` directive there instead.
This commit is contained in:
Alexander Udalov
2018-12-17 16:27:16 +01:00
parent e3c381a298
commit 5b58eb8491
86 changed files with 120 additions and 397 deletions
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0
// !LANGUAGE: -InlineConstVals
// FILE: Foo.kt
private const val OUTER_PRIVATE = 20
@@ -18,4 +18,4 @@ class Foo {
// 1 INVOKESTATIC
// 1 PUTSTATIC
// 2 GETSTATIC
// 2 GETSTATIC
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0
// !LANGUAGE: -InlineConstVals
const val z = 0
@@ -6,4 +6,4 @@ fun a() {
val x = z
}
// 1 GETSTATIC NoInlineKt.z : I
// 1 GETSTATIC NoInlineKt.z : I
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0
// !LANGUAGE: -InlineConstVals
const val z = 0
@@ -7,4 +7,4 @@ fun a() {
}
}
// 1 GETSTATIC NoInlineInCmpKt.z : I
// 1 GETSTATIC NoInlineInCmpKt.z : I
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0
// !LANGUAGE: -InlineConstVals
// FILE: test.kt
fun test1(a: A) = a.X
fun test2(a: A) = 1 + a.X
@@ -12,4 +12,4 @@ public class A {
// @TestKt.class:
// 0 42
// 0 43
// 3 GETFIELD A.X
// 3 GETFIELD A.X
@@ -1,15 +0,0 @@
// LANGUAGE_VERSION: 1.1
// FILE: test.kt
fun test1(a: A) = a.X
fun test2(a: A) = 1 + a.X
fun test3(a: A) = 1 < a.X
// FILE: A.java
public class A {
public final int X = 42;
}
// @TestKt.class:
// 0 42
// 0 43
// 3 GETFIELD A.X
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0
// !LANGUAGE: -InlineConstVals
const val one = 1
const val two = 2
@@ -8,4 +8,5 @@ fun test1() {
val p = 1
}
}
// 1 IF
// 1 IF
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0
// !LANGUAGE: -InlineConstVals
// FILE: first/Foo.java
package first;
@@ -20,4 +20,4 @@ class Bar : Foo() {
// @second/BarKt.class
// 1 INVOKESTATIC
// 0 GETSTATIC
// 1 BIPUSH 42
// 1 BIPUSH 42
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun almostAlwaysTrue() = true
fun runNoInline(f: () -> Unit) = f()
@@ -23,4 +21,4 @@ fun test() {
// 0 IFNULL
// 3 IFNONNULL
// 3 throwUninitializedPropertyAccessException
// 3 throwUninitializedPropertyAccessException
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun almostAlwaysTrue() = true
fun test() {
@@ -16,4 +14,4 @@ fun test() {
// 0 IFNULL
// 1 IFNONNULL
// 1 throwUninitializedPropertyAccessException
// 1 throwUninitializedPropertyAccessException
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun test() {
lateinit var z: String
run {
@@ -9,4 +7,4 @@ fun test() {
}
// 0 IFNULL
// 0 IFNONNULL
// 0 IFNONNULL
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0
// !LANGUAGE: -InlineConstVals
const val y = "cde"