diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-03-01 17:11:55 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-03-01 17:11:55 -0500 |
commit | a3dcafdf2fbc4445498b14d999c7680ed2329b54 (patch) | |
tree | f8c96f8f00c4ef23e730c4b86148c029a1e97c23 | |
parent | 52a6be4089e0b995694fb8a49d7de7e5e2b2dd7f (diff) |
initial tests for <signal.h>
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | signal.c | 13 | ||||
-rw-r--r-- | signal.d | 9 | ||||
-rw-r--r-- | signal.defs | 2 |
4 files changed, 25 insertions, 1 deletions
@@ -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 <signal.h> +#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 |