diff options
author | Christian Poveda <christian.poveda@ferrous-systems.com> | 2022-08-31 14:44:42 -0500 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-09-22 20:25:33 -1000 |
commit | 1704775d9183ae757cc67c16af267a517dac5a7c (patch) | |
tree | 4d01b5378f2d8b81b29690efc0564b073f7b7e01 | |
parent | 250150d0159ef02b35f65cd83d71d60f0439ee95 (diff) |
add tests
-rw-r--r-- | tests/expectations/tests/noreturn.rs | 13 | ||||
-rw-r--r-- | tests/headers/noreturn.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/expectations/tests/noreturn.rs b/tests/expectations/tests/noreturn.rs new file mode 100644 index 00000000..fa81ee76 --- /dev/null +++ b/tests/expectations/tests/noreturn.rs @@ -0,0 +1,13 @@ +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] + +extern "C" { + pub fn f() -> !; +} +extern "C" { + pub fn g(); +} diff --git a/tests/headers/noreturn.h b/tests/headers/noreturn.h new file mode 100644 index 00000000..9ce68518 --- /dev/null +++ b/tests/headers/noreturn.h @@ -0,0 +1,3 @@ +_Noreturn void f(void); +// TODO (pvdrz): figure out how to handle this case. +__attribute__((noreturn)) void g(void); |