core/tempq: Add a deinit() / init() loop to test_next()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
882ee6e1e7
commit
06ea2d8c0e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue