Thu, 13 Nov 2025 17:47:00 +0100
add missing test for cx_cmp_size()
| tests/test_compare.c | file | annotate | diff | comparison | revisions |
--- a/tests/test_compare.c Thu Nov 13 17:39:36 2025 +0100 +++ b/tests/test_compare.c Thu Nov 13 17:47:00 2025 +0100 @@ -64,7 +64,7 @@ typedef unsigned long cx_ulong; typedef unsigned long long cx_ulonglong; -// generate sub routines depending on the type +// generate subroutines depending on the type test_compare_gen_subroutine(int, INT_MAX, true) test_compare_gen_subroutine(long, LONG_MAX, true) test_compare_gen_subroutine(cx_longlong, LLONG_MAX, true) @@ -74,6 +74,7 @@ test_compare_gen_subroutine(unsigned, UINT_MAX, false) test_compare_gen_subroutine(cx_ulong, ULONG_MAX, false) test_compare_gen_subroutine(cx_ulonglong, ULLONG_MAX, false) +test_compare_gen_subroutine(size_t, SIZE_MAX, false) test_compare_gen_subroutine(uint16_t, UINT16_MAX, false) test_compare_gen_subroutine(uint32_t, UINT32_MAX, false) test_compare_gen_subroutine(uint64_t, UINT64_MAX, false) @@ -118,6 +119,10 @@ CX_TEST_DO CX_TEST_CALL_SUBROUTINE(test_sub_cmp_cx_ulonglong, cx_cmp_ulonglong); } +CX_TEST(test_compare_size_t) { + CX_TEST_DO CX_TEST_CALL_SUBROUTINE(test_sub_cmp_size_t, cx_cmp_size); +} + CX_TEST(test_compare_uint16_t) { CX_TEST_DO CX_TEST_CALL_SUBROUTINE(test_sub_cmp_uint16_t, cx_cmp_uint16); } @@ -170,6 +175,7 @@ cx_test_register(suite, test_compare_unsigned); cx_test_register(suite, test_compare_ulong); cx_test_register(suite, test_compare_ulonglong); + cx_test_register(suite, test_compare_size_t); cx_test_register(suite, test_compare_uint16_t); cx_test_register(suite, test_compare_uint32_t); cx_test_register(suite, test_compare_uint64_t);