[K/N][Tests] Migrate some cinterop tests to new infra
^KT-61259
This commit is contained in:
committed by
Space Team
parent
422128f3dc
commit
bf01cb16b4
@@ -1,9 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" void runAndCatch(void(*f)(void)) {
|
||||
try {
|
||||
f();
|
||||
} catch (...) {
|
||||
printf("CATCH IN C++!\n");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
language = C
|
||||
|
||||
---
|
||||
|
||||
void runAndCatch(void(*f)(void));
|
||||
@@ -1,13 +0,0 @@
|
||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||
|
||||
import kotlinx.cinterop.staticCFunction
|
||||
import cCallback.runAndCatch
|
||||
|
||||
fun throwingCallback() {
|
||||
throw IllegalStateException("Kotlin Exception!")
|
||||
}
|
||||
|
||||
|
||||
fun main() {
|
||||
runAndCatch(staticCFunction(::throwingCallback))
|
||||
}
|
||||
Reference in New Issue
Block a user