#ifndef TESTCASE_H #define TESTCASE_H #include #define TESTCASE_ERROR testcase_error_quark() typedef enum { TESTCASE_ERROR_FAILED } TestcaseError; typedef struct { guint line; guint column; /* or 0 for unspecified */ } TestcaseLocation; typedef struct { GSList *texts; } TestcaseSummary; typedef struct { /* * Does this warning relate to a real problem in the etext * (eg., error and false-negative). */ gboolean is_real; /* * Do we "expect" BOOKLOUPE to get this wrong * (eg., false-negative and false-positive) */ gboolean xfail; /* * For real problems, the first location should be the * actual location of the problem. */ GSList *locations; char *text; } TestcaseWarning; typedef struct { char *basename; char *tmpdir; GSList *inputs; GSList *outputs; char *expected; TestcaseSummary summary; GSList *warnings; char *encoding; /* The character encoding to talk to BOOKLOUPE in */ char **options; char *test_output; enum { TESTCASE_XFAIL=1<<0, TESTCASE_TMP_DIR=1<<1, TESTCASE_UNIX_NEWLINES=1<<2, TESTCASE_OS9_NEWLINES=1<<3, } flags; } Testcase; GQuark testcase_error_quark(void); gboolean testcase_run(Testcase *testcase); gboolean testcase_show_output(Testcase *testcase); void testcase_free(Testcase *testcase); #endif /* TESTCASE_H */