aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/unit-tests/t-prio-queue.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/unit-tests/t-prio-queue.c b/t/unit-tests/t-prio-queue.c
index d78b002f9e..616d0fc86f 100644
--- a/t/unit-tests/t-prio-queue.c
+++ b/t/unit-tests/t-prio-queue.c
@@ -31,16 +31,18 @@ static void test_prio_queue(int *input, int *result, size_t input_size)
get = prio_queue_get(&pq);
if (!check(peek == get))
return;
- if(!check_int(result[j++], ==, show(get)))
- test_msg("failed at result[] index %d", j-1);
+ if (!check_int(result[j], ==, show(get)))
+ test_msg(" j: %d", j);
+ j++;
break;
case DUMP:
while ((peek = prio_queue_peek(&pq))) {
get = prio_queue_get(&pq);
if (!check(peek == get))
return;
- if(!check_int(result[j++], ==, show(get)))
- test_msg("failed at result[] index %d", j-1);
+ if (!check_int(result[j], ==, show(get)))
+ test_msg(" j: %d", j);
+ j++;
}
break;
case STACK: