From 5c1a414347ca474415ae3167f1aa3c12afc4ceed Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Mon, 13 Nov 2017 14:51:06 +0300 Subject: [PATCH] A do-while loop serialization test. --- backend.native/tests/build.gradle | 6 ++++++ backend.native/tests/serialization/do_while.kt | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 backend.native/tests/serialization/do_while.kt diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 91fd5f1cffc..c5aeca822f6 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -2053,6 +2053,12 @@ task serialized_catch(type: LinkKonanTest) { goldValue = "Gotcha1: XXX\nGotcha2: YYY\n" } +task serialized_doWhile(type: LinkKonanTest) { + source = "serialization/use.kt" + lib = "serialization/do_while.kt" + goldValue = "999\n" +} + task testing_annotations(type: RunStandaloneKonanTest) { source = "testing/annotations.kt" flags = ['-tr'] diff --git a/backend.native/tests/serialization/do_while.kt b/backend.native/tests/serialization/do_while.kt new file mode 100644 index 00000000000..ee2ef54276d --- /dev/null +++ b/backend.native/tests/serialization/do_while.kt @@ -0,0 +1,7 @@ + +inline fun foo() { + do { + var x: Int = 999 + println(x) + } while (x != 999) +}