mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
25 lines
459 B
Kotlin
25 lines
459 B
Kotlin
import test.*
|
|
|
|
fun testCompilation(): String {
|
|
emptyFun()
|
|
emptyFun("K")
|
|
|
|
return "OK"
|
|
}
|
|
|
|
fun simple(): String {
|
|
return simpleFun() + simpleFun("K")
|
|
}
|
|
|
|
fun box(): String {
|
|
var result = testCompilation()
|
|
if (result != "OK") return "fail1: ${result}"
|
|
|
|
result = simple()
|
|
if (result != "OK") return "fail2: ${result}"
|
|
|
|
var result2 = simpleDoubleFun(2.0)
|
|
if (result2 != 2.0 + 1.0) return "fail3: ${result2}"
|
|
|
|
return "OK"
|
|
} |