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