From 306613c5a17842fc6967f9a9a3722a63767c3b75 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 1 Mar 2019 21:36:22 -0500 Subject: skeleton tests for all C99 headers --- stdint.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 stdint.c (limited to 'stdint.c') diff --git a/stdint.c b/stdint.c new file mode 100644 index 0000000..6214bdd --- /dev/null +++ b/stdint.c @@ -0,0 +1,44 @@ +#if defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ +#include +#include "test.h" + +void test_stdint_h(void) +{ + intptr_t intptr; + uintptr_t uintptr; + intmax_t intmax; + uintmax_t uintmax; + + testing_header("inttypes.h"); + + test_min(INTPTR_MIN, 0); + test_min(INTPTR_MAX, 0); + test_min(UINTPTR_MAX, 0); + + test_min(INTMAX_MIN, 0); + test_min(INTMAX_MAX, 0); + test_min(UINTMAX_MAX, 0); + + test_min(PTRDIFF_MIN, 0); + test_min(PTRDIFF_MAX, 0); + test_min(PTRDIFF_MAX, 0); + + test_min(SIG_ATOMIC_MIN, 0); + test_min(SIG_ATOMIC_MAX, 0); + + test_min(SIZE_MAX, 0); + + test_min(WCHAR_MIN, 0); + test_min(WCHAR_MAX, 0); + + test_min(WINT_MIN, 0); + test_min(WINT_MAX, 0); + + testing_end(); +} + +#else +void test_stdint_h(void) +{ +} +#endif -- cgit v1.2.1