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