KJS: remove obsolete kotlin.modules
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ object A {
|
||||
}
|
||||
|
||||
fun test() = js("""
|
||||
var a = Kotlin.modules.JS_TESTS.foo.A;
|
||||
var a = JS_TESTS.foo.A;
|
||||
return a.js_method() + ";" + a.js_property;
|
||||
""")
|
||||
|
||||
|
||||
+2
-2
@@ -9,12 +9,12 @@ package foo
|
||||
}
|
||||
|
||||
fun testA() = js("""
|
||||
var a = Kotlin.modules.JS_TESTS.foo.AA;
|
||||
var a = JS_TESTS.foo.AA;
|
||||
return a.foo();
|
||||
""")
|
||||
|
||||
fun testB() = js("""
|
||||
var b = new Kotlin.modules.JS_TESTS.foo.BB();
|
||||
var b = new JS_TESTS.foo.BB();
|
||||
return b.foo();
|
||||
""")
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun test() = js("""
|
||||
var module = Kotlin.modules.JS_TESTS.foo;
|
||||
var module = JS_TESTS.foo;
|
||||
return new (module.A)().js_f(23) + ";" + new (module.B)().js_f(42);
|
||||
""")
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class B : A {
|
||||
}
|
||||
|
||||
fun test() = js("""
|
||||
var module = Kotlin.modules.JS_TESTS.foo;
|
||||
var module = JS_TESTS.foo;
|
||||
return new (module.B)().js_f(23);
|
||||
""")
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ object A {
|
||||
}
|
||||
|
||||
fun test() = js("""
|
||||
return Kotlin.modules.JS_TESTS.foo.A.js_f(23);
|
||||
return JS_TESTS.foo.A.js_f(23);
|
||||
""")
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -5,7 +5,7 @@ class A(val x: String) {
|
||||
}
|
||||
|
||||
fun test() = js("""
|
||||
return Kotlin.modules.JS_TESTS.foo.A_int(23).x;
|
||||
return JS_TESTS.foo.A_int(23).x;
|
||||
""")
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ object A {
|
||||
}
|
||||
|
||||
fun test() = js("""
|
||||
var a = Kotlin.modules.JS_TESTS.foo.A;
|
||||
var a = JS_TESTS.foo.A;
|
||||
return a.js_f(23) + ";" + a.js_g(42) + ";" + a.js_p + ";" + a.js_q;
|
||||
""")
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ fun box(): String {
|
||||
|
||||
assertEquals(5, eval("3 + 2"))
|
||||
|
||||
val PACKAGE = "kotlin.modules.JS_TESTS.foo"
|
||||
val PACKAGE = "JS_TESTS.foo"
|
||||
assertEquals(top, eval("$PACKAGE.top"))
|
||||
|
||||
return "OK"
|
||||
|
||||
@@ -14,7 +14,7 @@ class A {
|
||||
val A.z: Int
|
||||
@JsName("getZ_") get() = 42
|
||||
|
||||
fun getPackage() = js("return Kotlin.modules.JS_TESTS.foo")
|
||||
fun getPackage() = js("return JS_TESTS.foo")
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
@@ -10,7 +10,7 @@ var y: Int = 0
|
||||
}
|
||||
|
||||
|
||||
fun getPackage() = js("return Kotlin.modules.JS_TESTS.foo")
|
||||
fun getPackage() = js("return JS_TESTS.foo")
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(23, x)
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ class B : A(), C {
|
||||
override val z = 55
|
||||
}
|
||||
|
||||
fun getPackage() = js("return Kotlin.modules.JS_TESTS.foo")
|
||||
fun getPackage() = js("return JS_TESTS.foo")
|
||||
|
||||
fun box(): String {
|
||||
val a = B()
|
||||
|
||||
@@ -25,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 = "kotlin.modules.JS_TESTS.foo"
|
||||
val PREFIX = "JS_TESTS.foo"
|
||||
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