[K/N][Tests] Move filecheck and cinterop tests to /native/

^KT-61259
This commit is contained in:
Vladimir Sukharev
2024-02-14 13:07:40 +01:00
committed by Space Team
parent 05cbe66ee0
commit bf0150108d
144 changed files with 1683 additions and 5542 deletions
@@ -0,0 +1,41 @@
// TARGET_BACKEND: NATIVE
// FREE_CINTEROP_ARGS: -header auxiliaryCppSources.h
// MODULE: cinterop
// FILE: auxiliaryCppSources.def
# The def file is intentionally empty
# `auxiliaryCppSources.h` is meant to be included via `-header` free arg of cinterop tool
// FILE: auxiliaryCppSources.h
#ifdef __cplusplus
extern "C" {
#endif
const char* name();
#ifdef __cplusplus
}
#endif
// FILE: auxiliaryCppSources.cpp
#include <string>
#include "auxiliaryCppSources.h"
static std::string _name = "OK";
extern "C" const char* name() {
return _name.c_str();
}
// MODULE: main(cinterop)
// FILE: main.kt
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
import auxiliaryCppSources.*
import kotlin.test.*
import kotlinx.cinterop.*
fun box(): String {
return name()!!.toKString()
}