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:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user