diff --git a/tests/core/tempq.c b/tests/core/tempq.c index a8e98f1b..6e287cdb 100644 --- a/tests/core/tempq.c +++ b/tests/core/tempq.c @@ -118,6 +118,13 @@ static void test_next() queue_add(q1, track_get(i)); } + tempq_save(NULL, Q_ENABLED); + tempq_deinit(); + tempq_init(NULL); + test_equal(tempq_count(), 2); + q0 = tempq_get(0); + q1 = tempq_get(1); + for (i = 0; i < track_db->db_size; i++) { test_loop_equal(queue_size(q0), track_db->db_size - i, i); test_loop_equal((void *)tempq_next(), (void *)track_get(i), i); @@ -126,6 +133,11 @@ static void test_next() test_equal(tempq_count(), 1); test_equal(queue_size(q1), track_db->db_size); + tempq_deinit(); + tempq_init(NULL); + test_equal(tempq_count(), 1); + q1 = tempq_get(0); + for (i = 0; i < track_db->db_size; i++) { test_loop_equal(queue_size(q1), track_db->db_size - i, i); test_loop_equal((void *)tempq_next(), (void *)track_get(i), i);