JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-29 12:37:13 +03:00
parent efb82a044f
commit cdf2212c73
70 changed files with 484 additions and 749 deletions
+27
View File
@@ -0,0 +1,27 @@
package foo
class Counter {
var count: Int = 0
public fun inc() {
count++
}
}
fun test(c: Counter, ex: Exception): Unit = js("""
try {
throw ex;
} catch (e) {
c.inc()
} finally {
c.inc()
}
""")
fun box(): String {
val c = Counter()
test(c, NullPointerException())
assertEquals(2, c.count)
return "OK"
}