ciabatta/test/test_assert.c

18 lines
234 B
C
Raw Normal View History

2022-06-16 12:36:35 +00:00
#include <assert.h>
2022-06-19 05:24:36 +00:00
#include <stddef.h>
#include <errno.h>
2022-06-19 05:24:36 +00:00
void do_more_stuff(char *ptr) {
assert(ptr != NULL);
}
void do_stuff() {
do_more_stuff(NULL);
}
2022-06-16 12:36:35 +00:00
int main() {
errno = 0;
2022-06-16 12:36:35 +00:00
assert(2+2 == 4);
2022-06-19 05:24:36 +00:00
do_stuff();
2022-06-16 12:36:35 +00:00
}