From c54e786c337623655b7527d9f5f3d820905b0cfc Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Fri, 18 Nov 2016 16:38:26 +0300 Subject: [PATCH] TEST: Ternary operator test. --- backend.native/tests/build.gradle | 5 +++++ backend.native/tests/runtime/basic/hello4.kt | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 backend.native/tests/runtime/basic/hello4.kt diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index bd489e0ea6f..c12097e794d 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -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" diff --git a/backend.native/tests/runtime/basic/hello4.kt b/backend.native/tests/runtime/basic/hello4.kt new file mode 100644 index 00000000000..77cb369ee71 --- /dev/null +++ b/backend.native/tests/runtime/basic/hello4.kt @@ -0,0 +1,5 @@ +fun main(args : Array) { + val x = 2 + println(if (x == 2) "Hello" else "Привет") + println(if (x == 3) "Bye" else "Пока") + } \ No newline at end of file