projects
/
platform
/
upstream
/
cmocka.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
tests: Add test_basics.
[platform/upstream/cmocka.git]
/
tests
/
test_exception_handler.c
1
#include <stdarg.h>
2
#include <stddef.h>
3
#include <setjmp.h>
4
#include <cmocka.h>
5
6
#include <stdlib.h>
7
8
struct test_segv {
9
int x;
10
int y;
11
};
12
13
static void test_segfault_recovery(void **state)
14
{
15
struct test_segv *s = NULL;
16
17
(void) state; /* unused */
18
19
s->x = 1;
20
}
21
22
int main(void) {
23
const UnitTest tests[] = {
24
unit_test(test_segfault_recovery),
25
};
26
27
return run_tests(tests);
28
}