[test] Don't run JS-specific irText tests against other backends
This commit is contained in:
committed by
Space Team
parent
17a8fd2c0b
commit
98e497509a
-144
@@ -2858,138 +2858,6 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI
|
||||
public void testAllFilesPresentInDynamic() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/dynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicAndMembersOfAny.kt")
|
||||
public void testDynamicAndMembersOfAny() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicAndMembersOfAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAccess.kt")
|
||||
public void testDynamicArrayAccess() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAssignment.kt")
|
||||
public void testDynamicArrayAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAugmentedAssignment.kt")
|
||||
public void testDynamicArrayAugmentedAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAugmentedAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayIncrementDecrement.kt")
|
||||
public void testDynamicArrayIncrementDecrement() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayIncrementDecrement.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryEqualityOperator.kt")
|
||||
public void testDynamicBinaryEqualityOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryEqualityOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryLogicalOperator.kt")
|
||||
public void testDynamicBinaryLogicalOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryLogicalOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryOperator.kt")
|
||||
public void testDynamicBinaryOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryRelationalOperator.kt")
|
||||
public void testDynamicBinaryRelationalOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryRelationalOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicCall.kt")
|
||||
public void testDynamicCall() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicElvisOperator.kt")
|
||||
public void testDynamicElvisOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicExclExclOperator.kt")
|
||||
public void testDynamicExclExclOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicExclExclOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicInfixCall.kt")
|
||||
public void testDynamicInfixCall() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicInfixCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAccess.kt")
|
||||
public void testDynamicMemberAccess() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAssignment.kt")
|
||||
public void testDynamicMemberAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAugmentedAssignment.kt")
|
||||
public void testDynamicMemberAugmentedAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberIncrementDecrement.kt")
|
||||
public void testDynamicMemberIncrementDecrement() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicUnaryOperator.kt")
|
||||
public void testDynamicUnaryOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicUnaryOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicWithSmartCast.kt")
|
||||
public void testDynamicWithSmartCast() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicWithSmartCast.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitCastFromDynamic.kt")
|
||||
public void testImplicitCastFromDynamic() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/implicitCastFromDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitCastToDynamic.kt")
|
||||
public void testImplicitCastToDynamic() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/implicitCastToDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invokeOperator.kt")
|
||||
public void testInvokeOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/invokeOperator.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -3000,12 +2868,6 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI
|
||||
public void testAllFilesPresentInExternal() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt38765.kt")
|
||||
public void testKt38765() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/external/kt38765.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -3016,12 +2878,6 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI
|
||||
public void testAllFilesPresentInNative() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nativeNativeKotlin.kt")
|
||||
public void testNativeNativeKotlin() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/native/nativeNativeKotlin.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java
Generated
-144
@@ -2858,138 +2858,6 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest {
|
||||
public void testAllFilesPresentInDynamic() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/dynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicAndMembersOfAny.kt")
|
||||
public void testDynamicAndMembersOfAny() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicAndMembersOfAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAccess.kt")
|
||||
public void testDynamicArrayAccess() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAssignment.kt")
|
||||
public void testDynamicArrayAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAugmentedAssignment.kt")
|
||||
public void testDynamicArrayAugmentedAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAugmentedAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayIncrementDecrement.kt")
|
||||
public void testDynamicArrayIncrementDecrement() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayIncrementDecrement.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryEqualityOperator.kt")
|
||||
public void testDynamicBinaryEqualityOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryEqualityOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryLogicalOperator.kt")
|
||||
public void testDynamicBinaryLogicalOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryLogicalOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryOperator.kt")
|
||||
public void testDynamicBinaryOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryRelationalOperator.kt")
|
||||
public void testDynamicBinaryRelationalOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryRelationalOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicCall.kt")
|
||||
public void testDynamicCall() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicElvisOperator.kt")
|
||||
public void testDynamicElvisOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicExclExclOperator.kt")
|
||||
public void testDynamicExclExclOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicExclExclOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicInfixCall.kt")
|
||||
public void testDynamicInfixCall() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicInfixCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAccess.kt")
|
||||
public void testDynamicMemberAccess() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAssignment.kt")
|
||||
public void testDynamicMemberAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAugmentedAssignment.kt")
|
||||
public void testDynamicMemberAugmentedAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberIncrementDecrement.kt")
|
||||
public void testDynamicMemberIncrementDecrement() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicUnaryOperator.kt")
|
||||
public void testDynamicUnaryOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicUnaryOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicWithSmartCast.kt")
|
||||
public void testDynamicWithSmartCast() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicWithSmartCast.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitCastFromDynamic.kt")
|
||||
public void testImplicitCastFromDynamic() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/implicitCastFromDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitCastToDynamic.kt")
|
||||
public void testImplicitCastToDynamic() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/implicitCastToDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invokeOperator.kt")
|
||||
public void testInvokeOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/invokeOperator.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -3000,12 +2868,6 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest {
|
||||
public void testAllFilesPresentInExternal() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt38765.kt")
|
||||
public void testKt38765() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/external/kt38765.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -3016,12 +2878,6 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest {
|
||||
public void testAllFilesPresentInNative() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nativeNativeKotlin.kt")
|
||||
public void testNativeNativeKotlin() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/native/nativeNativeKotlin.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
|
||||
@@ -5,4 +7,4 @@ fun test1(d: dynamic) = d.toString()
|
||||
|
||||
fun test2(d: dynamic) = d.hashCode()
|
||||
|
||||
fun test3(d: dynamic) = d.equals(42)
|
||||
fun test3(d: dynamic) = d.equals(42)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// FIR_IDENTICAL
|
||||
fun testArrayAccess1(d: dynamic) = d["KEY"]
|
||||
|
||||
fun testArrayAccess2(d: dynamic) = d()["KEY"]
|
||||
|
||||
fun testArrayAccess3(d: dynamic) = d.get("KEY")
|
||||
fun testArrayAccess3(d: dynamic) = d.get("KEY")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
fun testArrayAssignment(d: dynamic) {
|
||||
d["KEY"] = 1
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun testArrayAugmentedAssignment(d: dynamic) {
|
||||
d["KEY"] += "+="
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// FIR_IDENTICAL
|
||||
|
||||
fun testArrayIncrementDecrement(d: dynamic) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun testEqeq(d: dynamic) = d == 3
|
||||
fun testExclEq(d: dynamic) = d != 3
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// FIR_IDENTICAL
|
||||
fun testAndAnd(d: dynamic) = d && d
|
||||
fun testOrOr(d: dynamic) = d || d
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun testBinaryPlus(d: dynamic) = d + 1
|
||||
fun testBinaryMinus(d: dynamic) = d - 1
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun testLess(d: dynamic) = d < 2
|
||||
fun testLessOrEqual(d: dynamic) = d <= 2
|
||||
fun testGreater(d: dynamic) = d > 2
|
||||
fun testGreaterOrEqual(d: dynamic) = d >= 2
|
||||
fun testGreaterOrEqual(d: dynamic) = d >= 2
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// FIR_IDENTICAL
|
||||
fun test1(d: dynamic) = d.member(1, 2, 3)
|
||||
|
||||
@@ -5,4 +6,4 @@ fun test2(d: dynamic) = d?.member(1, 2, 3)
|
||||
|
||||
// Named arguments in dynamic calls are ignored by JS back-end.
|
||||
// If this becomes a compilation error, simply remove this particular test case.
|
||||
fun test3(d: dynamic) = d.member(a = 1, b = 2, c = 3)
|
||||
fun test3(d: dynamic) = d.member(a = 1, b = 2, c = 3)
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
fun test(d: dynamic) = d ?: "other"
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
fun test(d: dynamic) = d ?: "other"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
fun test(d: dynamic) = d!!
|
||||
// TARGET_BACKEND: JS_IR
|
||||
fun test(d: dynamic) = d!!
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun test1(d: dynamic) = d foo 123
|
||||
|
||||
fun test2(d: dynamic) = d invoke 123
|
||||
fun test2(d: dynamic) = d invoke 123
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun test1(d: dynamic) = d.member
|
||||
|
||||
fun test2(d: dynamic) = d?.member
|
||||
fun test2(d: dynamic) = d?.member
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
fun testMemberAssignment(d: dynamic) {
|
||||
d.m = 1
|
||||
}
|
||||
|
||||
fun testSafeMemberAssignment(d: dynamic) {
|
||||
d?.m = 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
fun testAugmentedMemberAssignment(d: dynamic) {
|
||||
d.m += "+="
|
||||
d.m -= "-="
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
|
||||
fun testMemberIncrementDecrement(d: dynamic) {
|
||||
@@ -12,4 +14,4 @@ fun testSafeMemberIncrementDecrement(d: dynamic) {
|
||||
val t2 = --d?.prefixDecr
|
||||
val t3 = d?.postfixIncr++
|
||||
val t4 = d?.postfixDecr--
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun testUnaryMinus(d: dynamic) = -d
|
||||
fun testUnaryPlus(d: dynamic) = +d
|
||||
fun testExcl(d: dynamic) = !d
|
||||
fun testExcl(d: dynamic) = !d
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
fun test1(d: dynamic) = if (d is String) d.length else -1
|
||||
|
||||
fun test2(d: dynamic) = if (d is Array<*>) d.size else -1
|
||||
fun test2(d: dynamic) = if (d is Array<*>) d.size else -1
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
val d: dynamic = 1
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
val d1: dynamic = 1
|
||||
|
||||
val p: Int = 1
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FIR_IDENTICAL
|
||||
fun invoke() {}
|
||||
|
||||
@@ -7,4 +9,4 @@ fun test3(a: dynamic, b: dynamic) = a(b)
|
||||
fun test4(a: dynamic, b: dynamic) = a.invoke(b)
|
||||
fun test5(a: dynamic, b: dynamic) = a(b)(b)
|
||||
fun test6(a: dynamic, b: dynamic) = a(b).invoke(b)
|
||||
fun test7(a: dynamic) = invoke()
|
||||
fun test7(a: dynamic) = invoke()
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
package events
|
||||
|
||||
external open class internal {
|
||||
@@ -15,4 +16,4 @@ external open class internal {
|
||||
}
|
||||
|
||||
interface NestedExternalInterface {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// FILE: nativeNativeKotlin.kt
|
||||
|
||||
package foo
|
||||
@@ -36,4 +37,4 @@ B.prototype.constructor = B;
|
||||
|
||||
B.prototype.bar = function () {
|
||||
return "B.bar"
|
||||
};
|
||||
};
|
||||
|
||||
-144
@@ -2858,138 +2858,6 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
|
||||
public void testAllFilesPresentInDynamic() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/dynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicAndMembersOfAny.kt")
|
||||
public void testDynamicAndMembersOfAny() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicAndMembersOfAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAccess.kt")
|
||||
public void testDynamicArrayAccess() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAssignment.kt")
|
||||
public void testDynamicArrayAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayAugmentedAssignment.kt")
|
||||
public void testDynamicArrayAugmentedAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayAugmentedAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicArrayIncrementDecrement.kt")
|
||||
public void testDynamicArrayIncrementDecrement() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicArrayIncrementDecrement.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryEqualityOperator.kt")
|
||||
public void testDynamicBinaryEqualityOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryEqualityOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryLogicalOperator.kt")
|
||||
public void testDynamicBinaryLogicalOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryLogicalOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryOperator.kt")
|
||||
public void testDynamicBinaryOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicBinaryRelationalOperator.kt")
|
||||
public void testDynamicBinaryRelationalOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicBinaryRelationalOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicCall.kt")
|
||||
public void testDynamicCall() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicElvisOperator.kt")
|
||||
public void testDynamicElvisOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicExclExclOperator.kt")
|
||||
public void testDynamicExclExclOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicExclExclOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicInfixCall.kt")
|
||||
public void testDynamicInfixCall() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicInfixCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAccess.kt")
|
||||
public void testDynamicMemberAccess() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAssignment.kt")
|
||||
public void testDynamicMemberAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberAugmentedAssignment.kt")
|
||||
public void testDynamicMemberAugmentedAssignment() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicMemberIncrementDecrement.kt")
|
||||
public void testDynamicMemberIncrementDecrement() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicUnaryOperator.kt")
|
||||
public void testDynamicUnaryOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicUnaryOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dynamicWithSmartCast.kt")
|
||||
public void testDynamicWithSmartCast() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/dynamicWithSmartCast.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitCastFromDynamic.kt")
|
||||
public void testImplicitCastFromDynamic() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/implicitCastFromDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitCastToDynamic.kt")
|
||||
public void testImplicitCastToDynamic() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/implicitCastToDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invokeOperator.kt")
|
||||
public void testInvokeOperator() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/dynamic/invokeOperator.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -3000,12 +2868,6 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
|
||||
public void testAllFilesPresentInExternal() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt38765.kt")
|
||||
public void testKt38765() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/external/kt38765.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -3016,12 +2878,6 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
|
||||
public void testAllFilesPresentInNative() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/js/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nativeNativeKotlin.kt")
|
||||
public void testNativeNativeKotlin() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/js/native/nativeNativeKotlin.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-6
@@ -97,12 +97,6 @@ abstract class AbstractIrTextTestBase<R : ResultingArtifact.FrontendOutput<R>>(t
|
||||
::IrPrettyKotlinDumpHandler
|
||||
)
|
||||
}
|
||||
|
||||
forTestsMatching("compiler/testData/ir/irText/js/*") {
|
||||
defaultDirectives {
|
||||
ModuleStructureDirectives.TARGET_BACKEND_KIND with TargetBackend.JS_IR
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user