1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/gplate/tags/tests/gplate-tag-test.h Fri Jul 02 02:56:50 2010 -0500
1.3 @@ -0,0 +1,33 @@
1.4 +#ifndef GPLATE_TAG_TEST_H
1.5 +#define GPLATE_TAG_TEST_H
1.6 +
1.7 +#include <gplate/gplate.h>
1.8 +
1.9 +#include <glib.h>
1.10 +
1.11 +#define gplate_tag_test_add(path, func) \
1.12 + g_test_add((path), GPlateTagTestFixture, NULL, gplate_tag_test_setup, (func), gplate_tag_test_teardown)
1.13 +
1.14 +typedef struct _GPlateTagTestFixture GPlateTagTestFixture;
1.15 +
1.16 +typedef void (*GPlateTagTestFixtureFunc)(GPlateTagTestFixture *fixture, gconstpointer data);
1.17 +
1.18 +struct _GPlateTagTestFixture {
1.19 + GPlateTemplate *template;
1.20 + GError *error;
1.21 +
1.22 + const gchar *template_string;
1.23 +
1.24 + const gchar *expected;
1.25 + gchar *actual;
1.26 +};
1.27 +
1.28 +G_BEGIN_DECLS
1.29 +
1.30 +void gplate_tag_test_setup(GPlateTagTestFixture *fixture, gconstpointer data);
1.31 +void gplate_tag_test_teardown(GPlateTagTestFixture *fixture, gconstpointer data);
1.32 +void gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data);
1.33 +
1.34 +G_END_DECLS
1.35 +
1.36 +#endif /* GPLATE_TAG_TEST_H */