Skip to content

Commit

Permalink
test: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Nov 4, 2024
1 parent 1729ecf commit 7e95d68
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/dtor_queue_all.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ main(void)

r = __MCF_dtor_queue_push(&queue, &elem);
assert(r == 0);
fprintf(stderr, "push: %d, size = %d\n", (int) elem.__this, (int) queue.__size);
fprintf(stderr, "push: %d, size = %d\n", (int)(intptr_t) elem.__this, (int)(intptr_t) queue.__size);
}

for(intptr_t k = 1000; k >= 1; --k) {
r = __MCF_dtor_queue_pop(&elem, &queue, __MCF_nullptr);
assert(r == 0);
fprintf(stderr, "pop: %d, size = %d\n", (int) elem.__this, (int) queue.__size);
fprintf(stderr, "pop: %d, size = %d\n", (int)(intptr_t) elem.__this, (int)(intptr_t) queue.__size);

assert(elem.__this == (void*) k);
assert(elem.__dso == (void*) (k % 10));
Expand Down
4 changes: 2 additions & 2 deletions test/dtor_queue_dso.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ main(void)

r = __MCF_dtor_queue_push(&queue, &elem);
assert(r == 0);
fprintf(stderr, "push: %d, size = %d\n", (int) elem.__this, (int) queue.__size);
fprintf(stderr, "push: %d, size = %d\n", (int)(intptr_t) elem.__this, (int)(intptr_t) queue.__size);

}

for(intptr_t m = 1; m <= 9; ++m) {
for(intptr_t k = 99; k >= 0; --k) {
r = __MCF_dtor_queue_pop(&elem, &queue, (void*) m);
assert(r == 0);
fprintf(stderr, "pop: %d, size = %d\n", (int) elem.__this, (int) queue.__size);
fprintf(stderr, "pop: %d, size = %d\n", (int)(intptr_t) elem.__this, (int)(intptr_t) queue.__size);

assert(elem.__this == (void*) (k * 10 + m));
assert(elem.__dso == (void*) m);
Expand Down
4 changes: 2 additions & 2 deletions test/dtor_queue_remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ main(void)

r = __MCF_dtor_queue_push(&queue, &elem);
assert(r == 0);
fprintf(stderr, "push: %d, size = %d\n", (int) elem.__this, (int) queue.__size);
fprintf(stderr, "push: %d, size = %d\n", (int)(intptr_t) elem.__this, (int)(intptr_t) queue.__size);

}

Expand All @@ -39,7 +39,7 @@ main(void)
for(intptr_t k = 99; k >= 0; --k) {
r = __MCF_dtor_queue_pop(&elem, &queue, (void*) m);
assert(r == 0);
fprintf(stderr, "pop: %d, size = %d\n", (int) elem.__this, (int) queue.__size);
fprintf(stderr, "pop: %d, size = %d\n", (int)(intptr_t) elem.__this, (int)(intptr_t) queue.__size);

assert(elem.__this == (void*) (k * 10 + m));
assert(elem.__dso == (void*) m);
Expand Down

0 comments on commit 7e95d68

Please sign in to comment.