grim/gplate

removed gplate_tag_test_output

2010-07-04, Gary Kramlich
2a257237a0ef
Parents ad26d98e20e6
Children 2771744219bd
removed gplate_tag_test_output
renamed gplate_tag_test_output_full to gplate_tag_test_output
updated as necessary
--- a/gplate/tags/tests/gplate-tag-test.c Sat Jul 03 23:24:33 2010 -0500
+++ b/gplate/tags/tests/gplate-tag-test.c Sun Jul 04 02:02:59 2010 -0500
@@ -36,7 +36,14 @@
}
void
-gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data) {
+gplate_tag_test_output(GPlateTagTestFixture *fixture,
+ gconstpointer data,
+ const gchar *template_string,
+ const gchar *expected)
+{
+ fixture->template_string = template_string;
+ fixture->expected = expected;
+
fixture->actual = gplate_template_render(fixture->template,
fixture->template_string,
&fixture->error);
--- a/gplate/tags/tests/gplate-tag-test.h Sat Jul 03 23:24:33 2010 -0500
+++ b/gplate/tags/tests/gplate-tag-test.h Sun Jul 04 02:02:59 2010 -0500
@@ -42,7 +42,7 @@
void gplate_tag_test_setup(GPlateTagTestFixture *fixture, gconstpointer data);
void gplate_tag_test_teardown(GPlateTagTestFixture *fixture, gconstpointer data);
-void gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data);
+void gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data, const gchar *template_string, const gchar *expected);
G_END_DECLS
--- a/gplate/tags/tests/gplate-text-tag-test.c Sat Jul 03 23:24:33 2010 -0500
+++ b/gplate/tags/tests/gplate-text-tag-test.c Sun Jul 04 02:02:59 2010 -0500
@@ -27,30 +27,26 @@
gplate_text_tag_test_syntax_plain(GPlateTagTestFixture *fixture,
gconstpointer data)
{
- fixture->template_string = "simple template";
- fixture->expected = "simple template";
-
- gplate_tag_test_output(fixture, data);
+ gplate_tag_test_output(fixture, data,
+ "simple template", "simple template");
}
static void
gplate_text_tag_test_syntax_keywords(GPlateTagTestFixture *fixture,
gconstpointer data)
{
- fixture->template_string = "extends if else endif for endfor";
- fixture->expected = "extends if else endif for endfor";
-
- gplate_tag_test_output(fixture, data);
+ gplate_tag_test_output(fixture, data,
+ "extends if else endif for endfor",
+ "extends if else endif for endfor");
}
static void
gplate_text_tag_test_syntax_keywords_case_sensitive(GPlateTagTestFixture *fixture,
gconstpointer data)
{
- fixture->template_string = "EXteNds iF eLse enDif fOr enDFor";
- fixture->expected = "EXteNds iF eLse enDif fOr enDFor";
-
- gplate_tag_test_output(fixture, data);
+ gplate_tag_test_output(fixture, data,
+ "EXteNds iF eLse enDif fOr enDFor",
+ "EXteNds iF eLse enDif fOr enDFor");
}
/******************************************************************************
--- a/gplate/tags/tests/gplate-variable-tag-test.c Sat Jul 03 23:24:33 2010 -0500
+++ b/gplate/tags/tests/gplate-variable-tag-test.c Sun Jul 04 02:02:59 2010 -0500
@@ -31,9 +31,6 @@
va_list vargs;
const gchar *name = NULL, *value = NULL;
- fixture->template_string = template_string;
- fixture->expected = expected;
-
va_start(vargs, expected);
while((name = va_arg(vargs, const gchar *))) {
value = va_arg(vargs, const gchar *);
@@ -41,10 +38,9 @@
gplate_collection_add_string(GPLATE_COLLECTION(fixture->template),
name, value);
}
-
va_end(vargs);
- gplate_tag_test_output(fixture, data);
+ gplate_tag_test_output(fixture, data, template_string, expected);
}
/******************************************************************************