KT-2752: add basic tests for JsName
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package foo
|
||||
|
||||
object A {
|
||||
@JsName("js_method") fun f() = "method"
|
||||
|
||||
@JsName("js_property") val f: String get() = "property"
|
||||
}
|
||||
|
||||
fun test() = js("""
|
||||
var a = Kotlin.modules.JS_TESTS.foo.A;
|
||||
return a.js_method() + ";" + a.js_property;
|
||||
""")
|
||||
|
||||
fun box(): String {
|
||||
val result = test()
|
||||
assertEquals("method;property", result);
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user