test/test_list.c

changeset 446
668757098b73
parent 444
cb944fa1852a
child 449
68ad5750ba6b
equal deleted inserted replaced
445:26ae21face39 446:668757098b73
49 // assume this structure for a linked list 49 // assume this structure for a linked list
50 struct ll_check { 50 struct ll_check {
51 cx_list_s base; 51 cx_list_s base;
52 void *begin; 52 void *begin;
53 void *end; 53 void *end;
54 ptrdiff_t ploc;
55 ptrdiff_t nloc;
56 }; 54 };
57 55
58 struct ll_check *actual = (struct ll_check *) list; 56 struct ll_check *actual = (struct ll_check *) list;
59 CU_ASSERT_PTR_NULL(actual->begin) 57 CU_ASSERT_PTR_NULL(actual->begin)
60 CU_ASSERT_PTR_NULL(actual->end) 58 CU_ASSERT_PTR_NULL(actual->end)
61 CU_ASSERT_EQUAL(0, actual->ploc)
62 CU_ASSERT_EQUAL(sizeof(void *), actual->nloc)
63 59
64 cxLinkedListDestroy(list); 60 cxLinkedListDestroy(list);
65 61
66 CU_ASSERT_TRUE(cxTestingAllocatorVerify()) 62 CU_ASSERT_TRUE(cxTestingAllocatorVerify())
67 } 63 }

mercurial