aboutsummaryrefslogtreecommitdiff
path: root/tests/test_pqueue.c
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-12-28 20:30:04 +0800
committerMistivia <i@mistivia.com>2025-12-28 20:30:19 +0800
commit86f6498768bd40c029504cdd5e711aa567248cb4 (patch)
tree2a525c102e77e1ae1cd632c5c0550e75e19e7c6e /tests/test_pqueue.c
parent6a299d9e7d9c3353394790b8048284a984fdfdc6 (diff)
modify pq
Diffstat (limited to 'tests/test_pqueue.c')
-rw-r--r--tests/test_pqueue.c7
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;
}