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
+28
View File
@@ -0,0 +1,28 @@
package foo
fun box(): String {
val c: Int = 3
if (c.toDouble() != 3.0) {
return "fail1"
}
if (c.toFloat() != 3.toFloat()) {
return "fail2"
}
if (c.toByte() != 3.toByte()) {
return "fail3"
}
if (c.toInt() != 3) {
return "fail4"
}
if (c.toShort() != 3.toShort()) {
return "fail5"
}
val c2: Int = -5
if (c2.toShort() != (-5).toShort()) {
return "fail6"
}
if (c2.toFloat() != -5.toFloat()) {
return "fail7"
}
return "OK"
}