From 22a93514ffa66582d365979894a13e3321cf303d Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Tue, 10 May 2022 23:10:58 +0200 Subject: [PATCH] Add EMPLACE test for priority queue --- tests/test-mprioqueue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-mprioqueue.c b/tests/test-mprioqueue.c index 1786e0f6..8dcf727b 100644 --- a/tests/test-mprioqueue.c +++ b/tests/test-mprioqueue.c @@ -256,6 +256,10 @@ static void test_update(void) front = obj_pqueue_front(p); assert ( (*front)->a == 5); + + obj_pqueue_emplace_ui(p, 0); + front = obj_pqueue_front(p); + assert ( (*front)->ptr[0] == 0); } obj_pqueue_clear(p); }