chiark / gitweb /
debugging for thing that crashed
[inn-innduct.git] / tests / libtest.h
1 /*  $Id: libtest.h 5955 2002-12-08 09:28:32Z rra $
2 **
3 **  Some utility routines for writing tests.
4 */
5
6 #ifndef TESTLIB_H
7 #define TESTLIB_H 1
8
9 #include "config.h"
10 #include <inn/defines.h>
11
12 /* A global buffer into which errors_capture stores errors. */
13 extern char *errors;
14
15 BEGIN_DECLS
16
17 void ok(int n, int success);
18 void ok_int(int n, int wanted, int seen);
19 void ok_string(int n, const char *wanted, const char *seen);
20
21 /* Turn on capturing of errors with errors_capture.  Errors reported by warn
22    will be stored in the global errors variable.  Turn this off again with
23    errors_uncapture.  Caller is responsible for freeing errors when done. */
24 void errors_capture(void);
25 void errors_uncapture(void);
26
27 END_DECLS
28
29 #endif /* TESTLIB_H */