JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-29 14:51:32 +03:00
parent a18f5eca2d
commit 9bf124af3f
129 changed files with 766 additions and 685 deletions
@@ -0,0 +1,24 @@
package foo
@native
class A {
constructor()
constructor(s: String)
constructor(i: Int)
val value: Any?
}
fun test(a: A, expectedValue: Any?, expectedTypeOfValue: String) {
assertTrue(a is A)
assertEquals(expectedValue, a.value)
assertEquals(expectedTypeOfValue, jsTypeOf(a.value))
}
fun box(): String {
test(A(), undefined, "undefined")
test(A("foo"), "foo", "string")
test(A(124), 124, "number")
return "OK"
}