bcfafc601e
This change allows to revert adding `WITH_STDLIB` directive to tests which happened at `a9343aeb`. Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
23 lines
402 B
Kotlin
Vendored
23 lines
402 B
Kotlin
Vendored
|
|
enum class Color {
|
|
RED,
|
|
BLUE
|
|
}
|
|
|
|
fun throwsOnGreen(): Boolean {
|
|
try {
|
|
Color.valueOf("GREEN")
|
|
return false
|
|
}
|
|
catch (e: Exception) {
|
|
return true
|
|
}
|
|
}
|
|
|
|
fun box() = if(
|
|
Color.valueOf("RED") == Color.RED
|
|
&& Color.valueOf("BLUE") == Color.BLUE
|
|
&& Color.values()[0] == Color.RED
|
|
&& Color.values()[1] == Color.BLUE
|
|
&& throwsOnGreen()
|
|
) "OK" else "fail" |