Move some tests from boxWithStdlib/ to box/
Move those tests which do not require neither stdlib nor reflect
This commit is contained in:
committed by
Alexander Udalov
parent
54a615fcd3
commit
20e36438e2
@@ -1,14 +0,0 @@
|
||||
enum class Color { RED, GREEN, BLUE }
|
||||
|
||||
fun foo(arr: Array<Color>): Color {
|
||||
loop@ for (color in arr) {
|
||||
when (color) {
|
||||
Color.RED -> return color
|
||||
Color.GREEN -> break@loop
|
||||
Color.BLUE -> if (arr.size == 1) return color else continue@loop
|
||||
}
|
||||
}
|
||||
return Color.GREEN
|
||||
}
|
||||
|
||||
fun box() = if (foo(arrayOf(Color.BLUE, Color.GREEN)) == Color.GREEN) "OK" else "FAIL"
|
||||
Reference in New Issue
Block a user