Criterion/samples/signal.c

20 lines
311 B
C
Raw Permalink Normal View History

2015-02-06 01:53:58 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <criterion/criterion.h>
Test(simple, caught, .signal = SIGSEGV) {
int *i = NULL;
*i = 42;
}
2015-08-04 15:18:39 +02:00
Test(simple, wrong_signal, .signal = SIGINT) {
int *i = NULL;
*i = 42;
2015-02-06 01:53:58 +01:00
}
Test(simple, uncaught) {
int *i = NULL;
*i = 42;
}