| author | ali <ali@juiblex.co.uk> |
| Thu Oct 17 08:30:04 2013 +0100 (2013-10-17) | |
| changeset 182 | 51c3ee3507e2 |
| parent 108 | 853e8a9ccfc9 |
| child 191 | 189183b37598 |
| child 200 | 8e0ba1a088c4 |
| 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 GSList *outputs;
41 char *expected;
42 GSList *warnings;
43 char *encoding; /* The character encoding to talk to BOOKLOUPE in */
44 char **options;
45 char *test_output;
46 enum {
47 TESTCASE_XFAIL=1<<0,
48 TESTCASE_TMP_DIR=1<<1,
49 } flags;
50 } Testcase;
52 GQuark testcase_error_quark(void);
53 gboolean testcase_run(Testcase *testcase);
54 gboolean testcase_show_output(Testcase *testcase);
55 void testcase_free(Testcase *testcase);
57 #endif /* TESTCASE_H */