author | ali <ali@juiblex.co.uk> |
Sat Sep 07 08:45:41 2013 +0100 (2013-09-07) | |
changeset 87 | 593e4ef5a0f2 |
parent 9 | 6a13fe0fc19e |
child 96 | 8c2d6a0cf717 |
permissions | -rw-r--r-- |
1 #ifndef TESTCASE_H
2 #define TESTCASE_H
4 #include <glib.h>
6 #define TESTCASE_ERROR testcase_error_quark()
8 typedef enum {
9 TESTCASE_ERROR_FAILED
10 } TestcaseError;
12 typedef struct {
13 guint line;
14 guint column; /* or 0 for unspecified */
15 } TestcaseLocation;
17 typedef struct {
18 /*
19 * Does this warning relate to a real problem in the etext
20 * (eg., error and false-negative).
21 */
22 gboolean is_real;
23 /*
24 * Do we "expect" BOOKLOUPE to get this wrong
25 * (eg., false-negative and false-positive)
26 */
27 gboolean xfail;
28 /*
29 * For real problems, the first location should be the
30 * actual location of the problem.
31 */
32 GSList *locations;
33 char *text;
34 } TestcaseWarning;
36 typedef struct {
37 char *basename;
38 char *tmpdir;
39 GSList *inputs;
40 char *expected;
41 GSList *warnings;
42 char *encoding; /* The character encoding to talk to BOOKLOUPE in */
43 char **options;
44 enum {
45 TESTCASE_XFAIL=1<<0,
46 TESTCASE_TMP_DIR=1<<1,
47 } flags;
48 } Testcase;
50 GQuark testcase_error_quark(void);
51 gboolean testcase_run(Testcase *testcase);
52 void testcase_free(Testcase *testcase);
54 #endif /* TESTCASE_H */