summaryrefslogtreecommitdiff
path: root/testcases.h
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2014-08-03 12:47:33 -0500
committerBobby Bingham <koorogi@koorogi.info>2014-08-03 12:47:33 -0500
commitf07937bb63ed12a50a203c3f8015649f37bc73e5 (patch)
treeb6fb47dcfd1048b4ac0b898480eb539c38ce6282 /testcases.h
parent85f2a592114832c67c70b9138905b44890b800bd (diff)
Rename generators to testcases
This is in preparation for adding an implementation of the quicksort-killer test case, which requires a custom comparison function rather than just a custom imput-generation function.
Diffstat (limited to 'testcases.h')
-rw-r--r--testcases.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/testcases.h b/testcases.h
new file mode 100644
index 0000000..036fe5d
--- /dev/null
+++ b/testcases.h
@@ -0,0 +1,17 @@
+#include <stddef.h>
+
+#include "sorters.h"
+
+#define MIN_SIZE 10000
+#define MAX_SIZE 10000000
+
+extern int buffer[MAX_SIZE];
+extern unsigned long comparisons;
+
+typedef void (*testinit)(int *, size_t);
+
+extern const struct testcase {
+ const char *name;
+ testinit init;
+ cmpfun cmp;
+} testcases[];