diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2014-08-03 13:24:36 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2014-08-03 13:24:36 -0500 |
commit | 7e76ff5acd182ca1a83242e094f2465d4b9a6040 (patch) | |
tree | 83e82f88ffb65ea4f8b33ad69fd69a6b72336544 /testcases.h | |
parent | f07937bb63ed12a50a203c3f8015649f37bc73e5 (diff) |
Make global state explicit in testcase generators
The quicksort-killer testcase will require more global state, unless we go
to the effort of implementing qsort_r versions of all the sorting
algorithms. Since we're not doing that, we'll simply make the global state
explicit.
Diffstat (limited to 'testcases.h')
-rw-r--r-- | testcases.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testcases.h b/testcases.h index 036fe5d..fc2ffd9 100644 --- a/testcases.h +++ b/testcases.h @@ -8,7 +8,9 @@ extern int buffer[MAX_SIZE]; extern unsigned long comparisons; -typedef void (*testinit)(int *, size_t); +void assert_sorted(size_t size, cmpfun cmp); + +typedef void (*testinit)(size_t); extern const struct testcase { const char *name; |