JS backend: added jsCode test cases

This commit is contained in:
Alexey Tsvetkov
2014-12-09 13:46:01 +03:00
parent 97bbcab77d
commit c3f67c54bd
32 changed files with 657 additions and 0 deletions
@@ -0,0 +1,14 @@
package foo
fun singleQuoted(i: Int): Int = js("return i")
fun tripleQuoted(i: Int): Int = js("""return i""")
fun tripleQuotedInnerQuotes(i: Int): String = js("""return "i"""")
fun box(): String {
assertEquals(0, singleQuoted(0))
assertEquals(0, tripleQuoted(0))
assertEquals("i", tripleQuotedInnerQuotes(0))
return "OK"
}