removed gplate_tag_test_output
authorGary Kramlich <grim@reaperworld.com>
Sun Jul 04 02:02:59 2010 -0500 (19 months ago)
changeset 3952a257237a0ef
parent 394 ad26d98e20e6
child 396 2771744219bd
removed gplate_tag_test_output
renamed gplate_tag_test_output_full to gplate_tag_test_output
updated as necessary
gplate/tags/tests/gplate-tag-test.c
gplate/tags/tests/gplate-tag-test.h
gplate/tags/tests/gplate-text-tag-test.c
gplate/tags/tests/gplate-variable-tag-test.c
     1.1 --- a/gplate/tags/tests/gplate-tag-test.c	Sat Jul 03 23:24:33 2010 -0500
     1.2 +++ b/gplate/tags/tests/gplate-tag-test.c	Sun Jul 04 02:02:59 2010 -0500
     1.3 @@ -36,7 +36,14 @@
     1.4  }
     1.5  
     1.6  void
     1.7 -gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data) {
     1.8 +gplate_tag_test_output(GPlateTagTestFixture *fixture,
     1.9 +                       gconstpointer data,
    1.10 +                       const gchar *template_string,
    1.11 +                       const gchar *expected)
    1.12 +{
    1.13 +	fixture->template_string = template_string;
    1.14 +	fixture->expected = expected;
    1.15 +
    1.16  	fixture->actual = gplate_template_render(fixture->template,
    1.17  	                                         fixture->template_string,
    1.18  	                                         &fixture->error);
     2.1 --- a/gplate/tags/tests/gplate-tag-test.h	Sat Jul 03 23:24:33 2010 -0500
     2.2 +++ b/gplate/tags/tests/gplate-tag-test.h	Sun Jul 04 02:02:59 2010 -0500
     2.3 @@ -42,7 +42,7 @@
     2.4  
     2.5  void gplate_tag_test_setup(GPlateTagTestFixture *fixture, gconstpointer data);
     2.6  void gplate_tag_test_teardown(GPlateTagTestFixture *fixture, gconstpointer data);
     2.7 -void gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data);
     2.8 +void gplate_tag_test_output(GPlateTagTestFixture *fixture, gconstpointer data, const gchar *template_string, const gchar *expected);
     2.9  
    2.10  G_END_DECLS
    2.11  
     3.1 --- a/gplate/tags/tests/gplate-text-tag-test.c	Sat Jul 03 23:24:33 2010 -0500
     3.2 +++ b/gplate/tags/tests/gplate-text-tag-test.c	Sun Jul 04 02:02:59 2010 -0500
     3.3 @@ -27,30 +27,26 @@
     3.4  gplate_text_tag_test_syntax_plain(GPlateTagTestFixture *fixture,
     3.5                                    gconstpointer data)
     3.6  {
     3.7 -	fixture->template_string = "simple template";
     3.8 -	fixture->expected = "simple template";
     3.9 -
    3.10 -	gplate_tag_test_output(fixture, data);
    3.11 +	gplate_tag_test_output(fixture, data,
    3.12 +	                       "simple template", "simple template");
    3.13  }
    3.14  
    3.15  static void
    3.16  gplate_text_tag_test_syntax_keywords(GPlateTagTestFixture *fixture,
    3.17                                       gconstpointer data)
    3.18  {
    3.19 -	fixture->template_string = "extends if else endif for endfor";
    3.20 -	fixture->expected = "extends if else endif for endfor";
    3.21 -
    3.22 -	gplate_tag_test_output(fixture, data);
    3.23 +	gplate_tag_test_output(fixture, data,
    3.24 +	                       "extends if else endif for endfor",
    3.25 +	                       "extends if else endif for endfor");
    3.26  }
    3.27  
    3.28  static void
    3.29  gplate_text_tag_test_syntax_keywords_case_sensitive(GPlateTagTestFixture *fixture,
    3.30                                                      gconstpointer data)
    3.31  {
    3.32 -	fixture->template_string = "EXteNds iF eLse enDif fOr enDFor";
    3.33 -	fixture->expected = "EXteNds iF eLse enDif fOr enDFor";
    3.34 -
    3.35 -	gplate_tag_test_output(fixture, data);
    3.36 +	gplate_tag_test_output(fixture, data,
    3.37 +	                       "EXteNds iF eLse enDif fOr enDFor",
    3.38 +	                       "EXteNds iF eLse enDif fOr enDFor");
    3.39  }
    3.40  
    3.41  /******************************************************************************
     4.1 --- a/gplate/tags/tests/gplate-variable-tag-test.c	Sat Jul 03 23:24:33 2010 -0500
     4.2 +++ b/gplate/tags/tests/gplate-variable-tag-test.c	Sun Jul 04 02:02:59 2010 -0500
     4.3 @@ -31,9 +31,6 @@
     4.4  	va_list vargs;
     4.5  	const gchar *name = NULL, *value = NULL;
     4.6  
     4.7 -	fixture->template_string = template_string;
     4.8 -	fixture->expected = expected;
     4.9 -
    4.10  	va_start(vargs, expected);
    4.11  	while((name = va_arg(vargs, const gchar *))) {
    4.12  		value = va_arg(vargs, const gchar *);
    4.13 @@ -41,10 +38,9 @@
    4.14  		gplate_collection_add_string(GPLATE_COLLECTION(fixture->template),
    4.15  		                             name, value);
    4.16  	}
    4.17 -
    4.18  	va_end(vargs);
    4.19  
    4.20 -	gplate_tag_test_output(fixture, data);
    4.21 +	gplate_tag_test_output(fixture, data, template_string, expected);
    4.22  }
    4.23  
    4.24  /******************************************************************************