diff options
Diffstat (limited to 'bench.c')
-rw-r--r-- | bench.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -34,14 +34,14 @@ int main() printf("%-*s ", SORT_WIDTH, size == MIN_SIZE ? s->name : ""); for (const struct testcase *t = testcases; t->name; t++) { comparisons = 0; - t->init(buffer, size); + t->init(size); if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start)) abort(); s->func(buffer, size, sizeof(int), t->cmp); if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &stop)) abort(); printf("%*lu %*lu ", CMP_WIDTH, comparisons, MS_WIDTH, timediff_ms(&start, &stop)); - assert_sorted(buffer, size); + assert_sorted(size, t->cmp); } printf(" %*zu\n", SIZE_WIDTH, size); } |