diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-08-08 14:33:42 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-08-08 14:33:42 -0400 |
commit | c5d8e6b22660ad302df20efd9c4fc890c281e680 (patch) | |
tree | 7ae4b071c0f5083c0bd19c00e2c53726603e3039 | |
parent | 1a834f6bd8897e1dfd3781a296f6bffc26deeece (diff) |
fill in missing values
-rw-r--r-- | stdint.c | 55 |
1 files changed, 33 insertions, 22 deletions
@@ -11,28 +11,39 @@ void test_stdint_h(void) testing_header("stdint.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); + test_min(INTPTR_MIN, -32767); + test_min(INTPTR_MAX, 32767); + test_min(UINTPTR_MAX, 65535); + + test_min(INTMAX_MIN, -9223372036854775807LL); + test_min(INTMAX_MAX, 9223372036854775807LL); + test_min(UINTMAX_MAX, 18446744073709551615ULL); + + test_min(PTRDIFF_MIN, -65535); + test_min(PTRDIFF_MAX, 65535); + + if (SIG_ATOMIC_MIN == 0) { + test_min(SIG_ATOMIC_MAX, 255); + } else { + test_min(SIG_ATOMIC_MIN, -127); + test_min(SIG_ATOMIC_MAX, 127); + } + + test_min(SIZE_MAX, 65535); + + if (WCHAR_MIN == 0) { + test_min(WCHAR_MAX, 255); + } else { + test_min(WCHAR_MIN, -127); + test_min(WCHAR_MAX, 127); + } + + if (WINT_MIN == 0) { + test_min(WINT_MAX, 65535); + } else { + test_min(WINT_MIN, 0); + test_min(WINT_MAX, 0); + } testing_end(); } |