Sort out blackBox*() methods

- get rid of blackBox(), extract tests into files
- delete single-file usages of blackBoxMultiFile()
- inline some other blackBox methods
- suppress exception in blackBoxWithJava()
This commit is contained in:
Alexander Udalov
2013-01-24 22:19:25 +04:00
parent c8f73cfdae
commit 74467df3ef
9 changed files with 63 additions and 60 deletions
@@ -0,0 +1,7 @@
class A() {
class object {
val value = 10
}
}
fun box() = if (A.value == 10) "OK" else "Fail ${A.value}"
@@ -0,0 +1,12 @@
fun f(x: Long, zzz: Long = 1): Long
{
return if (x <= 1) zzz
else f(x-1, x*zzz)
}
fun box() : String
{
val six: Long = 6;
if (f(six) != 720.toLong()) return "Fail"
return "OK"
}
@@ -0,0 +1 @@
fun box() = if ((1 ?: 0) == 1) "OK" else "fail"
@@ -0,0 +1,5 @@
fun box(): String {
if (3.compareTo(2) != 1) return "Fail #1"
if (5.toByte().compareTo(10.toLong()) >= 0) return "Fail #2"
return "OK"
}