[JS IR BE] Fix and refactor interop tests
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1301
|
||||
package foo
|
||||
|
||||
public interface A {
|
||||
fun foo() {
|
||||
@@ -11,7 +9,7 @@ public interface B : A {
|
||||
}
|
||||
}
|
||||
|
||||
external class Function(vararg args: String)
|
||||
external class Function(args: String, body: String)
|
||||
|
||||
val hasProp = Function("obj, prop", "return obj[prop] !== undefined") as ((Any, String) -> Boolean)
|
||||
|
||||
@@ -27,7 +25,7 @@ fun box(): String {
|
||||
if (!hasProp(b, "foo")) return "B hasn't foo"
|
||||
if (!hasProp(b, "boo")) return "B hasn't boo"
|
||||
|
||||
val PREFIX = "_.foo"
|
||||
val PREFIX = "_"
|
||||
if (eval("$PREFIX.A") == null) return "$PREFIX.A not found"
|
||||
if (eval("$PREFIX.B") == null) return "$PREFIX.B not found"
|
||||
if (eval("$PREFIX.A === $PREFIX.B") as Boolean) return "A and B refer to the same object"
|
||||
|
||||
Reference in New Issue
Block a user