Remove generated codegen tests, move all testData to box/

A single test file will be generated out of box/ directory
This commit is contained in:
Alexander Udalov
2013-01-25 16:26:56 +04:00
committed by Alexander Udalov
parent 41a416da60
commit 7ce62a5b64
147 changed files with 0 additions and 1258 deletions
@@ -0,0 +1,16 @@
fun box(): String {
val sb = StringBuilder()
for (i in -1..1) {
for (j in -1..1) {
val a = i compareTo j
val b = i.compareTo(j)
if (a != b) {
sb.append("$i compareTo $j: $a != $b\n")
}
}
}
if (sb.length() == 0) return "OK"
return "Fail:\n$sb"
}
@@ -0,0 +1,6 @@
fun box(): String {
if (12.toString() equals "13") {
return "Fail"
}
return "OK"
}
@@ -0,0 +1,6 @@
fun box(): String {
val l: Long = 1
val l2: Long = 2
val r = l.rangeTo(l2)
return if (r.start == l && r.end == l2) "OK" else "fail"
}
@@ -0,0 +1,25 @@
fun box(): String {
if (239.toByte().toString() != (239.toByte() as Byte?).toString()) return "byte failed"
if (239.toShort().toString() != (239.toShort() as Short?).toString()) return "short failed"
if (239.toInt().toString() != (239.toInt() as Int?).toString()) return "int failed"
if (239.toFloat().toString() != (239.toFloat() as Float?).toString()) return "float failed"
if (239.toLong().toString() != (239.toLong() as Long?).toString()) return "long failed"
if (239.toDouble().toString() != (239.toDouble() as Double?).toString()) return "double failed"
if (true.toString() != (true as Boolean?).toString()) return "boolean failed"
if ('a'.toChar().toString() != ('a'.toChar() as Char?).toString()) return "char failed"
if ("${239.toByte()}" != (239.toByte() as Byte?).toString()) return "byte template failed"
if ("${239.toShort()}" != (239.toShort() as Short?).toString()) return "short template failed"
if ("${239.toInt()}" != (239.toInt() as Int?).toString()) return "int template failed"
if ("${239.toFloat()}" != (239.toFloat() as Float?).toString()) return "float template failed"
if ("${239.toLong()}" != (239.toLong() as Long?).toString()) return "long template failed"
if ("${239.toDouble()}" != (239.toDouble() as Double?).toString()) return "double template failed"
if ("${true}" != (true as Boolean?).toString()) return "boolean template failed"
if ("${'a'.toChar()}" != ('a'.toChar() as Char?).toString()) return "char template failed"
for(b in 0..255) {
if("${b.toByte()}" != (b.toByte() as Byte?).toString()) return "byte conversion failed"
}
return "OK"
}