Files
kotlin-fork/compiler/testData/codegen/box/intrinsics/compareTo.kt
T
Alexander Udalov 7ce62a5b64 Remove generated codegen tests, move all testData to box/
A single test file will be generated out of box/ directory
2013-01-28 18:20:21 +04:00

17 lines
356 B
Kotlin

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"
}