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
fun testSwitch(number: Int): String = js("""
var result;
switch(number) {
case 1:
result = "one";
break;
case 2:
result = "two";
break;
default:
result = "don't know";
break;
}
return result;
""")
fun box(): String {
assertEquals("one", testSwitch(1))
assertEquals("two", testSwitch(2))
assertEquals("don't know", testSwitch(3))
return "OK"
}