gplate/tags/tests/test-gplate-tag.h
author Gary Kramlich <grim@reaperworld.com>
Sun Jul 04 03:34:39 2010 -0500 (22 months ago)
changeset 400 0938cb5d076b
parent 395 gplate/tags/tests/gplate-tag-test.h@2a257237a0ef
permissions -rw-r--r--
the start of the test name standardization

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