diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-03-01 21:09:38 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-03-01 21:09:38 -0500 |
commit | 3289aef6dd90453f46f0ba3102ae184734374dc7 (patch) | |
tree | 37a813f7ac62a915c045675db4f93861bd529d4d /stdlib.c | |
parent | 2c9f47eb2eb7456948aeb8bed307e6b39be2cc32 (diff) |
skeleton tests for all C89 headers
Diffstat (limited to 'stdlib.c')
-rw-r--r-- | stdlib.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/stdlib.c b/stdlib.c new file mode 100644 index 0000000..1b59e1c --- /dev/null +++ b/stdlib.c @@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <limits.h> +#include "test.h" + +void test_stdlib_h(void) +{ + div_t div; + ldiv_t ldiv; + size_t size; + wchar_t wchar; + + int exit_statuses[] = { + EXIT_FAILURE, + EXIT_SUCCESS, + }; + + testing_header("stdlib.h"); + + test_distinct(exit_statuses); + test_min(MB_CUR_MAX, 1); + test_max(MB_CUR_MAX, MB_LEN_MAX); + test_true(NULL == 0); + test_min(RAND_MAX, 32767); + + testing_end(); +} |