From a3dcafdf2fbc4445498b14d999c7680ed2329b54 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 1 Mar 2019 17:11:55 -0500 Subject: initial tests for --- main.c | 2 +- signal.c | 13 +++++++++++++ signal.d | 9 +++++++++ signal.defs | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 signal.c create mode 100644 signal.d create mode 100644 signal.defs diff --git a/main.c b/main.c index c6436c4..55fcfcc 100644 --- a/main.c +++ b/main.c @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) test_locale_h(); /* test_math_h(); */ /* test_setjmp_h(); */ - /* test_signal_h(); */ + test_signal_h(); /* test_stdalign_h(); */ /* test_stdarg_h(); */ /* test_stdatomic_h(); */ diff --git a/signal.c b/signal.c new file mode 100644 index 0000000..13aa074 --- /dev/null +++ b/signal.c @@ -0,0 +1,13 @@ +#include +#include "test.h" + +#include "signal.d" + +void test_signal_h(void) +{ + testing_header("signal.h"); + + test_distinct(signals); + + testing_end(); +} diff --git a/signal.d b/signal.d new file mode 100644 index 0000000..233e8b1 --- /dev/null +++ b/signal.d @@ -0,0 +1,9 @@ +static sig_atomic_t a_sig_atomic_t; + +static int signals[] = { + SIGABRT, + SIGFPE, + SIGILL, + SIGINT, + SIGSEGV, +}; diff --git a/signal.defs b/signal.defs new file mode 100644 index 0000000..5640f97 --- /dev/null +++ b/signal.defs @@ -0,0 +1,2 @@ +type sig_atomic_t +distinct signals SIGABRT SIGFPE SIGILL SIGINT SIGSEGV SIGTERM -- cgit v1.2.1