omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
omega-bridge / tests / native / v2 / fsmain.c
| 1 | /* Hosted driver for fsuse.c (tests/native/v2/run.sh): runs fs_check, then a refused call through the |
| 2 | * out-of-line API, which must abort (SIGABRT) as the inline wrappers do. */ |
| 3 | #include "omega_api_decl.h" |
| 4 | #include <stdio.h> |
| 5 | #include <string.h> |
| 6 | |
| 7 | int fs_check(void); |
| 8 | |
| 9 | int main(int argc, char **argv) |
| 10 | { |
| 11 | if (argc > 1 && strcmp(argv[1], "refuse") == 0) { |
| 12 | uint8_t s8[8]; |
| 13 | swap8(s8, 7, s8); /* trap 3: abort */ |
| 14 | printf("not aborted\n"); |
| 15 | return 0; |
| 16 | } |
| 17 | int bad = fs_check(); |
| 18 | printf("%s fs_check %d\n", bad ? "FAIL" : "PASS", bad); |
| 19 | return bad != 0; |
| 20 | } |