|
grim@389
|
1 |
#ifndef GPLATE_TAG_TEST_H |
|
grim@389
|
2 |
#define GPLATE_TAG_TEST_H |
|
grim@389
|
3 |
|
|
grim@389
|
4 |
#include <gplate/gplate.h> |
|
grim@389
|
5 |
|
|
grim@389
|
6 |
#include <glib.h> |
|
grim@389
|
7 |
|
|
grim@389
|
8 |
#define gplate_tag_test_add(path, func) \ |
|
grim@389
|
9 |
g_test_add((path), GPlateTagTestFixture, NULL, gplate_tag_test_setup, (func), gplate_tag_test_teardown) |
|
grim@389
|
10 |
|
|
grim@389
|
11 |
typedef struct _GPlateTagTestFixture GPlateTagTestFixture; |
|
grim@389
|
12 |
|
|
grim@389
|
13 |
typedef void (*GPlateTagTestFixtureFunc)(GPlateTagTestFixture *fixture, gconstpointer data); |
|
grim@389
|
14 |
|
|
grim@389
|
15 |
struct _GPlateTagTestFixture { |
|
grim@389
|
16 |
GPlateTemplate *template; |
|
grim@389
|
17 |
GError *error; |
|
grim@389
|
18 |
|
|
grim@389
|
19 |
const gchar *template_string; |
|
grim@389
|
20 |
|
|
grim@389
|
21 |
const gchar *expected; |
|
grim@389
|
22 |
gchar *actual; |
|
grim@389
|
23 |
}; |
|
grim@389
|
24 |
|
|
grim@389
|
25 |
G_BEGIN_DECLS |
|
grim@389
|
26 |
|
|
grim@389
|
27 |
void gplate_tag_test_setup(GPlateTagTestFixture *fixture, gconstpointer data); |
|
grim@389
|
28 |
void gplate_tag_test_teardown(GPlateTagTestFixture *fixture, gconstpointer data); |
|
grim@389
|
29 |
void gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data); |
|
grim@389
|
30 |
|
|
grim@389
|
31 |
G_END_DECLS |
|
grim@389
|
32 |
|
|
grim@389
|
33 |
#endif /* GPLATE_TAG_TEST_H */ |