From 97ce2227d5fb1bb6ccce2b2247d093659ff288fe Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Mon, 23 Jan 2017 12:49:53 +0700 Subject: [PATCH] backend/tests: add boxing{14,15} the latter is disabled. --- backend.native/tests/build.gradle | 11 +++++++++++ backend.native/tests/codegen/boxing/boxing14.kt | 5 +++++ backend.native/tests/codegen/boxing/boxing15.kt | 5 +++++ 3 files changed, 21 insertions(+) create mode 100644 backend.native/tests/codegen/boxing/boxing14.kt create mode 100644 backend.native/tests/codegen/boxing/boxing15.kt diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 2185ab191d6..7b54c0e32d0 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -502,6 +502,17 @@ task boxing13(type: RunKonanTest) { source = "codegen/boxing/boxing13.kt" } +task boxing14(type: RunKonanTest) { + goldValue = "42\n" + source = "codegen/boxing/boxing14.kt" +} + +task boxing15(type: RunKonanTest) { + disabled = true + goldValue = "17\n" + source = "codegen/boxing/boxing15.kt" +} + task interface0(type: RunKonanTest) { goldValue = "PASSED\n" source = "runtime/basic/interface0.kt" diff --git a/backend.native/tests/codegen/boxing/boxing14.kt b/backend.native/tests/codegen/boxing/boxing14.kt new file mode 100644 index 00000000000..0cf6ae3ff59 --- /dev/null +++ b/backend.native/tests/codegen/boxing/boxing14.kt @@ -0,0 +1,5 @@ +fun main(args: Array) { + 42.println() +} + +fun T.println() = println(this.toString()) \ No newline at end of file diff --git a/backend.native/tests/codegen/boxing/boxing15.kt b/backend.native/tests/codegen/boxing/boxing15.kt new file mode 100644 index 00000000000..f9a27c90931 --- /dev/null +++ b/backend.native/tests/codegen/boxing/boxing15.kt @@ -0,0 +1,5 @@ +fun main(args: Array) { + println(foo(17)) +} + +fun foo(x: T): Int = x \ No newline at end of file