[test] Don't run JS-specific irText tests against other backends
This commit is contained in:
committed by
Space Team
parent
17a8fd2c0b
commit
98e497509a
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user