Rename directory for back-end tests

This commit is contained in:
Andrey Breslav
2013-11-26 20:34:10 +04:00
parent fe00b03279
commit c70a54306f
25 changed files with 54 additions and 54 deletions
@@ -0,0 +1,15 @@
tailRecursive fun withWhen(counter : Int, d : Any, x : Any) : Int =
if (counter == 0) {
0
}
else if (counter == 5) {
withWhen(counter - 1, 999, "tail")
}
else
when (d) {
is String -> withWhen(counter - 1, "is String", "tail")
is Number -> withWhen(counter, "is Number", "tail")
else -> throw IllegalStateException()
}
fun box() : String = if (withWhen(100000, "test", "test") == 0) "OK" else "FAIL"