From 7e76ff5acd182ca1a83242e094f2465d4b9a6040 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 3 Aug 2014 13:24:36 -0500 Subject: 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. --- testcases.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testcases.h') 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; -- cgit v1.2.3