tests/test_list.c

changeset 1113
dce04550fbef
parent 1111
78eeeb950883
equal deleted inserted replaced
1112:22dc2163fffd 1113:dce04550fbef
1606 cx_foreach(int*, e, iter) { 1606 cx_foreach(int*, e, iter) {
1607 CX_TEST_ASSERT(*e == swapped[iter.index]); 1607 CX_TEST_ASSERT(*e == swapped[iter.index]);
1608 } 1608 }
1609 }) 1609 })
1610 1610
1611 CX_TEST(test_list_ll_swap_no_sbo) {
1612 set_up_combo
1613 CxList *list = cxLinkedListCreate(alloc, cx_cmp_int, 2*cx_linked_list_swap_sbo_size);
1614 CX_TEST_CALL_SUBROUTINE(test_list_verify_swap, list, false);
1615 tear_down_combo
1616 }
1617 CX_TEST(test_list_arl_swap_no_sbo) { 1611 CX_TEST(test_list_arl_swap_no_sbo) {
1618 set_up_combo 1612 set_up_combo
1619 CxList *list = cxArrayListCreate(alloc, cx_cmp_int, 2*cx_array_swap_sbo_size, 8); 1613 CxList *list = cxArrayListCreate(alloc, cx_cmp_int, 2*cx_array_swap_sbo_size, 8);
1620 CX_TEST_CALL_SUBROUTINE(test_list_verify_swap, list, false); 1614 CX_TEST_CALL_SUBROUTINE(test_list_verify_swap, list, false);
1621 tear_down_combo 1615 tear_down_combo
2031 cx_test_register(suite, test_list_pll_clear); 2025 cx_test_register(suite, test_list_pll_clear);
2032 cx_test_register(suite, test_list_ll_at); 2026 cx_test_register(suite, test_list_ll_at);
2033 cx_test_register(suite, test_list_pll_at); 2027 cx_test_register(suite, test_list_pll_at);
2034 cx_test_register(suite, test_list_ll_swap); 2028 cx_test_register(suite, test_list_ll_swap);
2035 cx_test_register(suite, test_list_pll_swap); 2029 cx_test_register(suite, test_list_pll_swap);
2036 cx_test_register(suite, test_list_ll_swap_no_sbo);
2037 cx_test_register(suite, test_list_ll_find); 2030 cx_test_register(suite, test_list_ll_find);
2038 cx_test_register(suite, test_list_pll_find); 2031 cx_test_register(suite, test_list_pll_find);
2039 cx_test_register(suite, test_list_ll_sort); 2032 cx_test_register(suite, test_list_ll_sort);
2040 cx_test_register(suite, test_list_pll_sort); 2033 cx_test_register(suite, test_list_pll_sort);
2041 cx_test_register(suite, test_list_ll_reverse); 2034 cx_test_register(suite, test_list_ll_reverse);

mercurial