tests/test_list.c

changeset 890
54565fd74e74
parent 886
5f5514bb104b
child 912
9533fc293aea
equal deleted inserted replaced
889:f549fd9fbd8f 890:54565fd74e74
1048 static CX_TEST_SUBROUTINE(test_list_verify_##name, CxList *list, \ 1048 static CX_TEST_SUBROUTINE(test_list_verify_##name, CxList *list, \
1049 __attribute__((__unused__)) bool isptrlist) body \ 1049 __attribute__((__unused__)) bool isptrlist) body \
1050 roll_out_test_invokers(name) 1050 roll_out_test_invokers(name)
1051 1051
1052 static void set_default_class_funcs(CxList *list, cx_list_class *defaulted_cl) { 1052 static void set_default_class_funcs(CxList *list, cx_list_class *defaulted_cl) {
1053 cx_list_class const *cl = list->climpl == NULL ? list->cl : list->climpl; 1053 const cx_list_class *cl = list->climpl == NULL ? list->cl : list->climpl;
1054 memcpy(defaulted_cl, cl, sizeof(cx_list_class)); 1054 memcpy(defaulted_cl, cl, sizeof(cx_list_class));
1055 defaulted_cl->insert_array = cx_list_default_insert_array; 1055 defaulted_cl->insert_array = cx_list_default_insert_array;
1056 defaulted_cl->insert_sorted = cx_list_default_insert_sorted; 1056 defaulted_cl->insert_sorted = cx_list_default_insert_sorted;
1057 defaulted_cl->sort = cx_list_default_sort; 1057 defaulted_cl->sort = cx_list_default_sort;
1058 defaulted_cl->swap = cx_list_default_swap; 1058 defaulted_cl->swap = cx_list_default_swap;
1562 static void advanced_destr_test_fun(__attribute__((__unused__)) void *u, void *data) { 1562 static void advanced_destr_test_fun(__attribute__((__unused__)) void *u, void *data) {
1563 simple_destr_test_fun(data); 1563 simple_destr_test_fun(data);
1564 } 1564 }
1565 1565
1566 static CX_TEST_SUBROUTINE(test_list_verify_destructor, CxList *list, 1566 static CX_TEST_SUBROUTINE(test_list_verify_destructor, CxList *list,
1567 int const *testdata, size_t testdata_len) { 1567 const int *testdata, size_t testdata_len) {
1568 destr_test_ctr = 0; 1568 destr_test_ctr = 0;
1569 1569
1570 int off = cxListIsStoringPointers(list) ? 1 : 0; 1570 int off = cxListIsStoringPointers(list) ? 1 : 0;
1571 1571
1572 cxListRemove(list, 15); 1572 cxListRemove(list, 15);

mercurial