[kotlin-native][test][dynamic test] tests provoking generating empty structs kt-42796

This commit is contained in:
Vasily Levchenko
2021-04-09 20:26:41 +02:00
committed by Space
parent 2adea2122e
commit 62ffc0033d
5 changed files with 49 additions and 0 deletions
@@ -4460,6 +4460,18 @@ dynamicTest("kt36639") {
|""".stripMargin()
}
for (i in 0..2) {
dynamicTest("kt42796_$i") {
clangTool = "clang++"
disabled = (project.target.name != project.hostName)
source = "produce_dynamic/kt-42796/main-${i}.kt"
cSource = "$projectDir/produce_dynamic/kt-42796/main.cpp"
goldValue = ""
clangFlags = ["-DTEST=$i", "-Werror"]
}
}
dynamicTest("interop_concurrentRuntime") {
disabled = (project.target.name != project.hostName)
disabled = true // KT-43180
@@ -0,0 +1,8 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package empty
internal fun internalZerro() = 0
@@ -0,0 +1,8 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package empty.nonempty
fun one() = 1
@@ -0,0 +1,8 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package empty.nonempty.internalEmpty
internal fun two() = 3
@@ -0,0 +1,13 @@
#include "testlib_api.h"
#define __ testlib_symbols()->
#define T_(x) testlib_kref_ ## x
int
main() {
#if TEST == 1
__ kotlin.root.empty.nonempty.one();
#endif
return 0;
}