diff options
| author | Mistivia <i@mistivia.com> | 2025-12-28 20:30:04 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-12-28 20:30:19 +0800 |
| commit | 86f6498768bd40c029504cdd5e711aa567248cb4 (patch) | |
| tree | 2a525c102e77e1ae1cd632c5c0550e75e19e7c6e /tests | |
| parent | 6a299d9e7d9c3353394790b8048284a984fdfdc6 (diff) | |
modify pq
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_pqueue.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/test_pqueue.c b/tests/test_pqueue.c index 3d61552..638db73 100644 --- a/tests/test_pqueue.c +++ b/tests/test_pqueue.c @@ -15,9 +15,6 @@ void MinInt_show(Int self, FILE* fp) { Int_show(self, fp); } -VECTOR_DEF(MinInt); -VECTOR_IMPL(MinInt); - PQUEUE_DEF(MinInt); PQUEUE_IMPL(MinInt); @@ -51,7 +48,7 @@ int main() { MinIntPQueue_pop(&minpq); } assert(MinIntPQueue_top(&minpq) == NULL); - MinIntVector_free(&minpq.vec); + MinIntPQueue_free(&minpq); int elems2[10] = {-10, -8, -7, -9, -5, -6, -4, -2, -3, -1}; int expected[10] = {-10, -8, -7, -7, -5, -5, -4, -2, -2, -1}; @@ -61,7 +58,7 @@ int main() { int *top = IntPQueue_top(&pq); assert(*top == expected[i]); } - IntVector_free(&pq.vec); + IntPQueue_free(&pq); printf("[PASS] pqueue\n"); return 0; } |
