[test] Run irText tests against K1 frontend for JS

This commit is contained in:
Sergej Jaskiewicz
2023-03-14 20:20:53 +01:00
committed by Space Team
parent 502a0b7e10
commit 27ccef868a
135 changed files with 6607 additions and 697 deletions
@@ -2,6 +2,8 @@
// See KT-44312
// IGNORE_BACKEND_K2: ANY
// ^ TODO decide if we want to fix KT-42020 for FIR as well
// IGNORE_BACKEND_K1: JS_IR
// IGNORE_BACKEND_K1: JS_IR_ES6
open class Base<T> {
fun foo(x: T) {}
@@ -66,4 +68,4 @@ open class Outer<T> {
class OuterDerived : Outer<String>() {
inner class InnerDerived : Inner()
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
// FIR_IDENTICAL
// WITH_STDLIB
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
class C(x: Int, val y: Int, var z: Int = 1) {
constructor() : this(0, 0, 0) {}
+2 -2
View File
@@ -1,5 +1,5 @@
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
class TestClass
+4 -1
View File
@@ -1,5 +1,8 @@
// FIR_IDENTICAL
// SKIP_KLIB_TEST
// IGNORE_BACKEND_K1: JS_IR
// IGNORE_BACKEND_K1: JS_IR_ES6
class A : Cloneable
interface I : Cloneable
@@ -8,4 +11,4 @@ class C : I
class OC : I {
override fun clone(): OC = OC()
}
}
@@ -1,5 +1,8 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
data class Test1(val x: Int, val y: String, val z: Any)
data class Test2(val x: Any?)
data class Test3(val d: Double, val dn: Double?, val f: Float, val df: Float?)
data class Test3(val d: Double, val dn: Double?, val f: Float, val df: Float?)
@@ -1,5 +1,7 @@
// WITH_STDLIB
// SKIP_KLIB_TEST
// IGNORE_BACKEND_K1: JS_IR
// IGNORE_BACKEND_K1: JS_IR_ES6
sealed class A : CharSequence {
data class B(val c: CharSequence) : A(), CharSequence by c
@@ -1,4 +1,6 @@
// SKIP_KT_DUMP
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
data class A(val x: Int) {
val String.x: String get() = this
@@ -1,7 +1,10 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
// This test emulates 'allopen' compiler plugin.
@Suppress("INCOMPATIBLE_MODIFIERS")
open data class ValidatedProperties(
open val test1: String,
open val test2: String
)
)
+2 -2
View File
@@ -1,6 +1,6 @@
// WITH_STDLIB
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
enum class TestEnum1 {
TEST1, TEST2
+2 -2
View File
@@ -1,5 +1,5 @@
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
enum class TestFinalEnum1 {
X1
}
@@ -1,5 +1,5 @@
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
enum class A {
X("asd"),
Y() {
@@ -1,6 +1,6 @@
// WITH_STDLIB
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
enum class Test0(val x: Int) {
ZERO;
+2 -2
View File
@@ -1,7 +1,7 @@
// FIR_IDENTICAL
// WITH_STDLIB
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
class Test1 {
init {
+2 -2
View File
@@ -1,6 +1,6 @@
// FIR_IDENTICAL
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
class TestInitValInLambdaCalledOnce {
val x: Int
init {
+3 -1
View File
@@ -1,3 +1,5 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
inline class Test(val x: Int)
inline class Test(val x: Int)
@@ -1,7 +1,7 @@
// FIR_IDENTICAL
// WITH_STDLIB
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
interface IFoo {
fun foo()