ERASE method returns bool (like dictionnary)

This commit is contained in:
Patrick Pelissier committed 2018-10-27 22:43:06 +02:00
1 parent f7f7d7bc38
commit 12bf9c0f59
2 files changed
+8 -3

No files matched your search

+5 -1
View File
@@ -68,7 +68,11 @@ static void test1(void)
int_pqueue_push(p, 5);
int_pqueue_pop(&x, p);
assert (x == 5);
int_pqueue_push(p, 17);
bool b = int_pqueue_erase(p, 17);
assert(b);
b = int_pqueue_erase(p, 1742);
assert(!b);
int_pqueue_clear(p);
}