diff options
Diffstat (limited to 'test/test.h')
| -rw-r--r-- | test/test.h | 11 |
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); | |||
| 25 | bool issolved(cube_t); | 25 | bool issolved(cube_t); |
| 26 | cube_t readcube(char *, char *); | 26 | cube_t readcube(char *, char *); |
| 27 | void writecube(char *, cube_t, char *); | 27 | void writecube(char *, cube_t, char *); |
| 28 | void nissy_setlogger(void (*logger_function)(const char *, va_list)); | 28 | void 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 */ |
| 31 | void run(void); | 31 | void run(void); |
| 32 | 32 | ||
| 33 | void log_stderr(const char *str, va_list vl) { vfprintf(stderr, str, vl); } | 33 | void 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 | ||
| 35 | int main(void) { | 42 | int main(void) { |
| 36 | nissy_setlogger(log_stderr); | 43 | nissy_setlogger(log_stderr); |
