[Native][tests] Initial support for CExport in the new test infra
Very trivial implementation of CExport test infrastructure based on work from LLDB tests and ObjCExport tests.
This commit is contained in:
committed by
Space Team
parent
13618fc03b
commit
1c24f994db
@@ -0,0 +1,7 @@
|
||||
#include "smoke0_api.h"
|
||||
|
||||
int main() {
|
||||
if (foo() != 42) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||
|
||||
import kotlin.native.CName
|
||||
|
||||
@CName("foo")
|
||||
fun foo(): Int {
|
||||
return 42
|
||||
}
|
||||
Reference in New Issue
Block a user