Sat, 10 Aug 2019 08:45:12 +0200
fixes array_equals test (broken on 32 bit platforms)
test/array_tests.c | file | annotate | diff | comparison | revisions |
1.1 --- a/test/array_tests.c Sat Aug 10 08:44:36 2019 +0200 1.2 +++ b/test/array_tests.c Sat Aug 10 08:45:12 2019 +0200 1.3 @@ -161,13 +161,13 @@ 1.4 } 1.5 1.6 UCX_TEST(test_ucx_array_equals) { 1.7 - UcxArray a1 = ucx_array_new(16, sizeof(int)); 1.8 - UcxArray a2 = ucx_array_new(16, sizeof(int)); 1.9 - UcxArray a3 = ucx_array_new(16, sizeof(long int)); 1.10 - UcxArray a4 = ucx_array_new(16, sizeof(int)); 1.11 + UcxArray a1 = ucx_array_new(16, sizeof(int32_t)); 1.12 + UcxArray a2 = ucx_array_new(16, sizeof(int32_t)); 1.13 + UcxArray a3 = ucx_array_new(16, sizeof(int64_t)); 1.14 + UcxArray a4 = ucx_array_new(16, sizeof(int32_t)); 1.15 1.16 - int *intelems; 1.17 - long int *longintelems; 1.18 + int32_t *intelems; 1.19 + int64_t *longintelems; 1.20 1.21 a1.size = 5; 1.22 intelems = a1.data; 1.23 @@ -200,12 +200,12 @@ 1.24 1.25 UCX_TEST_BEGIN 1.26 1.27 - UCX_TEST_ASSERT(ucx_array_equals(a1, a2, ucx_cmp_int, NULL), "failed"); 1.28 - UCX_TEST_ASSERT(!ucx_array_equals(a1, a4, ucx_cmp_int, NULL), "failed"); 1.29 - UCX_TEST_ASSERT(!ucx_array_equals(a4, a1, ucx_cmp_int, NULL), "failed"); 1.30 - UCX_TEST_ASSERT(!ucx_array_equals(a1, a3, ucx_cmp_int, NULL), 1.31 + UCX_TEST_ASSERT(ucx_array_equals(a1, a2, ucx_cmp_int32, NULL), "failed"); 1.32 + UCX_TEST_ASSERT(!ucx_array_equals(a1, a4, ucx_cmp_int32, NULL), "failed"); 1.33 + UCX_TEST_ASSERT(!ucx_array_equals(a4, a1, ucx_cmp_int32, NULL), "failed"); 1.34 + UCX_TEST_ASSERT(!ucx_array_equals(a1, a3, ucx_cmp_int64, NULL), 1.35 "comparing arrays of different element size shall fail"); 1.36 - UCX_TEST_ASSERT(!ucx_array_equals(a3, a1, ucx_cmp_int, NULL), 1.37 + UCX_TEST_ASSERT(!ucx_array_equals(a3, a1, ucx_cmp_int64, NULL), 1.38 "comparing arrays of different element size shall fail"); 1.39 1.40 UCX_TEST_ASSERT(ucx_array_equals(a1, a2, NULL, NULL),