diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index cf3fd49cf02..bfc38177a17 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -397,3 +397,16 @@ task throw0(type: RunKonanTest) { goldValue = "Done\n" source = "runtime/basic/throw0.kt" } +/* +task boxing0(type: RunKonanTest) { + goldValue = "17\n" + source = "runtime/basic/boxing0.kt" +} +*/ +/* +task interface0(type: RunKonanTest) { + goldValue = "PASS\n" + source = "runtime/basic/interface0.kt" +} +*/ + diff --git a/backend.native/tests/runtime/basic/boxing0.kt b/backend.native/tests/runtime/basic/boxing0.kt new file mode 100644 index 00000000000..6b29115005f --- /dev/null +++ b/backend.native/tests/runtime/basic/boxing0.kt @@ -0,0 +1,10 @@ + +class Box(t: T) { + var value = t +} + +fun main(args: Array) { + val box: Box = Box(17) + println(box.value) +} + diff --git a/backend.native/tests/runtime/basic/interface0.kt b/backend.native/tests/runtime/basic/interface0.kt new file mode 100644 index 00000000000..a1dfbfcb891 --- /dev/null +++ b/backend.native/tests/runtime/basic/interface0.kt @@ -0,0 +1,17 @@ + +interface A { + fun b() = c() + fun c() +} + +class B(): A { + override fun c() { + println("PASSED") + } +} + +fun main(args: Array) { + val a:A = B() + a.b() +} +