Add _hash, _equal_p, _out_str, _in_str, _get_str, _parse_str

for intrusive list.
This commit is contained in:
Patrick Pelissier committed 2018-10-03 22:01:40 +02:00
1 parent 4f3dad4bea
commit c87696f5c1
3 files changed
+8 -2

No files matched your search

+3 -1
View File
@@ -35,7 +35,7 @@ typedef struct test_s {
#include "coverage.h"
START_COVERAGE
ILIST_DEF(ilist_tname, test_t)
ILIST_DEF(ilist_tname, test_t, M_POD_OPLIST)
END_COVERAGE
ILIST_DEF(ilist_free, test_t, (DEL(free)))
@@ -143,6 +143,7 @@ static void test2(void)
}
assert (ilist_tname_size(list1) == NUM);
assert (ilist_tname_size(list2) == 0);
assert (ilist_tname_equal_p(list1, list2) == false);
ilist_tname_it_t it;
ilist_tname_it (it, list1);
for(int i = 0; i < NUM; i++) {
@@ -151,6 +152,7 @@ static void test2(void)
}
assert (ilist_tname_size(list1) == 0);
assert (ilist_tname_size(list2) == NUM);
assert (ilist_tname_equal_p(list1, list2) == false);
int n = 0;
for M_EACH(item, list2, ILIST_OPLIST(ilist_tname)) {
assert (n == item->n);