JS backend: tests for char type

This commit is contained in:
Michael Nedzelsky
2014-09-24 18:25:43 +04:00
parent 6aff9803c4
commit 9d49089041
13 changed files with 283 additions and 0 deletions
@@ -0,0 +1,14 @@
package foo
fun box(): String {
assertEquals('A', 'A'.toChar(), "toChar")
assertEquals(65, 'A'.toInt(), "toInt")
assertEquals(65: Short, 'A'.toShort(), "toShort")
assertEquals(65: Byte, 'A'.toByte(), "toByte")
assertEquals(65.0, 'A'.toDouble(), "toDouble")
assertEquals(65.0f, 'A'.toFloat(), "toFloat")
assertEquals(65L, 'A'.toLong(), "toLong")
return "OK"
}