KT-12877: modify tests to check whether mutable top-level properties of JsModule files are supported
This commit is contained in:
committed by
Alexey Andreev
parent
b1d8f91212
commit
7be872ebca
@@ -23,6 +23,7 @@ define("lib", [], function() {
|
||||
A: A,
|
||||
B: B,
|
||||
foo: foo,
|
||||
bar: bar
|
||||
bar: bar,
|
||||
mbar: -1
|
||||
};
|
||||
});
|
||||
@@ -16,6 +16,8 @@ package foo
|
||||
|
||||
@native val bar: Int = noImpl
|
||||
|
||||
@native var mbar: Int = noImpl
|
||||
|
||||
fun box(): String {
|
||||
val a = A(23)
|
||||
assertEquals(23, a.x)
|
||||
@@ -27,5 +29,8 @@ fun box(): String {
|
||||
assertEquals(365, foo(42))
|
||||
assertEquals(423, bar)
|
||||
|
||||
mbar = 523
|
||||
assertEquals(523, mbar)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -23,7 +23,8 @@ define("lib", [], function() {
|
||||
A: A,
|
||||
B: B,
|
||||
foo: foo,
|
||||
bar: bar
|
||||
bar: bar,
|
||||
mbar: -1
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ package foo
|
||||
|
||||
@native val bar: Int = noImpl
|
||||
|
||||
@native var mbar: Int = noImpl
|
||||
|
||||
// FILE: lib2.kt
|
||||
package foo
|
||||
|
||||
@@ -40,5 +42,8 @@ fun box(): String {
|
||||
|
||||
assertEquals(12345, C.f())
|
||||
|
||||
mbar = 523
|
||||
assertEquals(523, mbar)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user