|
grim@394
|
1 |
/* |
|
grim@394
|
2 |
* Copyright (C) 2007-2010 Gary Kramlich <grim@reaperworld.com> |
|
grim@394
|
3 |
* |
|
grim@394
|
4 |
* This program is free software: you can redistribute it and/or modify |
|
grim@394
|
5 |
* it under the terms of the GNU General Public License as published by |
|
grim@394
|
6 |
* the Free Software Foundation, either version 3 of the License, or |
|
grim@394
|
7 |
* (at your option) any later version. |
|
grim@394
|
8 |
* |
|
grim@394
|
9 |
* This program is distributed in the hope that it will be useful, |
|
grim@394
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
grim@394
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
grim@394
|
12 |
* GNU General Public License for more details. |
|
grim@394
|
13 |
* |
|
grim@394
|
14 |
* You should have received a copy of the GNU General Public License |
|
grim@394
|
15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
grim@394
|
16 |
*/ |
|
grim@400
|
17 |
#ifndef TEST_GPLATE_TAG_H |
|
grim@400
|
18 |
#define TEST_GPLATE_TAG_H |
|
grim@389
|
19 |
|
|
grim@389
|
20 |
#include <gplate/gplate.h> |
|
grim@389
|
21 |
|
|
grim@389
|
22 |
#include <glib.h> |
|
grim@389
|
23 |
|
|
grim@400
|
24 |
#define test_gplate_tag_add(path, func) \ |
|
grim@400
|
25 |
g_test_add((path), TestGPlateTagFixture, NULL, test_gplate_tag_setup, (func), test_gplate_tag_teardown) |
|
grim@389
|
26 |
|
|
grim@400
|
27 |
typedef struct _TestGPlateTagFixture TestGPlateTagFixture; |
|
grim@389
|
28 |
|
|
grim@400
|
29 |
typedef void (*TestGPlateTagFixtureFunc)(TestGPlateTagFixture *fixture, gconstpointer data); |
|
grim@389
|
30 |
|
|
grim@400
|
31 |
struct _TestGPlateTagFixture { |
|
grim@389
|
32 |
GPlateTemplate *template; |
|
grim@389
|
33 |
GError *error; |
|
grim@389
|
34 |
|
|
grim@389
|
35 |
const gchar *template_string; |
|
grim@389
|
36 |
|
|
grim@389
|
37 |
const gchar *expected; |
|
grim@389
|
38 |
gchar *actual; |
|
grim@389
|
39 |
}; |
|
grim@389
|
40 |
|
|
grim@389
|
41 |
G_BEGIN_DECLS |
|
grim@389
|
42 |
|
|
grim@400
|
43 |
void test_gplate_tag_setup(TestGPlateTagFixture *fixture, gconstpointer data); |
|
grim@400
|
44 |
void test_gplate_tag_teardown(TestGPlateTagFixture *fixture, gconstpointer data); |
|
grim@400
|
45 |
void test_gplate_tag_output(TestGPlateTagFixture *fixture, gconstpointer data, const gchar *template_string, const gchar *expected); |
|
grim@389
|
46 |
|
|
grim@389
|
47 |
G_END_DECLS |
|
grim@389
|
48 |
|
|
grim@400
|
49 |
#endif /* TEST_GPLATE_TAG_H */ |
|
grim@400
|
50 |
|