aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test.h b/test/test.h
index 415e093..d092244 100644
--- a/test/test.h
+++ b/test/test.h
@@ -25,12 +25,19 @@ bool issolvable(cube_t);
25bool issolved(cube_t); 25bool issolved(cube_t);
26cube_t readcube(char *, char *); 26cube_t readcube(char *, char *);
27void writecube(char *, cube_t, char *); 27void writecube(char *, cube_t, char *);
28void nissy_setlogger(void (*logger_function)(const char *, va_list)); 28void nissy_setlogger(void (*logger_function)(const char *, ...));
29 29
30/* Test function to be implemented by all tests */ 30/* Test function to be implemented by all tests */
31void run(void); 31void run(void);
32 32
33void log_stderr(const char *str, va_list vl) { vfprintf(stderr, str, vl); } 33void log_stderr(const char *str, ...)
34{
35 va_list args;
36
37 va_start(args, str);
38 vfprintf(stderr, str, args);
39 va_end(args);
40}
34 41
35int main(void) { 42int main(void) {
36 nissy_setlogger(log_stderr); 43 nissy_setlogger(log_stderr);

Generated with cgit - Back to sebastiano.tronto.net