Rename BUFFER, I-LIST, PRIOQUEUE & SHARED _clean in _reset to avoid confusing _clean & _clear functions. See #97

This commit is contained in:
Patrick Pelissier committed 2021-10-28 18:08:07 +02:00
1 parent 826d251ffe
commit 836d892832
9 files changed
+51 -24

No files matched your search

+3 -3
View File
@@ -125,7 +125,7 @@ static void test_global(void)
assert (!buffer_uint_full_p(g_buff));
assert (buffer_uint_size(g_buff) == 0);
buffer_uint_clean(g_buff);
buffer_uint_reset(g_buff);
assert (buffer_uint_empty_p(g_buff));
assert (!buffer_uint_full_p(g_buff));
assert (buffer_uint_size(g_buff) == 0);
@@ -145,7 +145,7 @@ static void test_global(void)
assert (buffer_uint_size(g_buff) == 10);
assert (buffer_uint_push_blocking(g_buff, 15, false) == false);
buffer_uint_clean(g_buff);
buffer_uint_reset(g_buff);
assert (buffer_uint_empty_p(g_buff));
assert (!buffer_uint_full_p(g_buff));
assert (buffer_uint_size(g_buff) == 0);
@@ -260,7 +260,7 @@ static void test_no_thread(void)
b = buffer_llong_push(buff, c);
assert (b == true);
buffer_llong_clean(buff);
buffer_llong_reset(buff);
assert (buffer_llong_empty_p(buff) == true);
buffer_llong_clear(buff);
+3
View File
@@ -135,6 +135,9 @@ static void test(void)
assert (ilist_tname_size (list) == 2);
assert (ilist_tname_cref(it1) == &x3);
assert (ilist_tname_previous_obj(list, &x3) == &x1);
ilist_tname_reset(list);
assert (ilist_tname_empty_p(list));
ilist_tname_clear(list);
}
+1 -1
View File
@@ -275,7 +275,7 @@ static void test_it(void)
int_pqueue_swap(p, q);
assert(int_pqueue_size(p) == 20);
assert(int_pqueue_size(q) == 21);
int_pqueue_clean(q);
int_pqueue_reset(q);
assert(!int_pqueue_equal_p(p, q));
assert(int_pqueue_empty_p(q));
assert(!int_pqueue_empty_p(p));
+4 -4
View File
@@ -59,14 +59,14 @@ static void test1(void)
shared_int_init_set(p2, p1);
assert(f(p2) == 12);
shared_int_clean(p1);
shared_int_reset(p1);
assert(shared_int_NULL_p(p1));
assert(!shared_int_NULL_p(p2));
assert(f(p2) == 12);
shared_int_set(p1, p2);
shared_int_clean(p2);
shared_int_reset(p2);
assert(!shared_int_NULL_p(p1));
assert(shared_int_NULL_p(p2));
assert(f(p1) == 12);
@@ -75,8 +75,8 @@ static void test1(void)
assert(!shared_int_NULL_p(p2));
assert(f(p2) == 12);
shared_int_clean(p2);
shared_int_clean(p1);
shared_int_reset(p2);
shared_int_reset(p1);
assert(shared_int_NULL_p(p1));
assert(shared_int_NULL_p(p2));