TEST: Ternary operator test.

This commit is contained in:
Nikolay Igotti
2016-11-18 16:38:26 +03:00
committed by vvlevchenko
parent ce059ac54b
commit c54e786c33
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -282,6 +282,11 @@ task hello3(type: RunKonanTest) {
source = "runtime/basic/hello3.kt"
}
task hello4(type: RunKonanTest) {
goldValue = "Hello\nПока\n"
source = "runtime/basic/hello4.kt"
}
task tostring0(type: RunKonanTest) {
goldValue = "127\n-1\n239\nA\n1122334455\n112233445566778899\n3.14159\n1E+27\n1E-300\ntrue\nfalse\n"
source = "runtime/basic/tostring0.kt"
@@ -0,0 +1,5 @@
fun main(args : Array<String>) {
val x = 2
println(if (x == 2) "Hello" else "Привет")
println(if (x == 3) "Bye" else "Пока")
}