summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-self-test.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-11-16 21:15:02 +0000
committerRichard Hughes <richard@hughsie.com>2016-11-21 15:19:55 +0000
commitbd6ea9106e0539364e66c6dc6fb5f5f3b0878920 (patch)
tree1105f249751103a08b0cc72a7d539ca38de59602 /libappstream-glib/as-self-test.c
parent977f0cc2623dc89e68b4c0d41b0164c59ac9a1ca (diff)
downloadappstream-glib-bd6ea9106e0539364e66c6dc6fb5f5f3b0878920.tar.gz
Use refcounted strings in all objects
This drops the RSS by ~1Mb and has the potential to do much more drastic things if this is used in GNOME Software.
Diffstat (limited to 'libappstream-glib/as-self-test.c')
-rw-r--r--libappstream-glib/as-self-test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index 457a4c5..09c9619 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -2233,22 +2233,22 @@ as_test_app_no_markup_func (void)
static void
as_test_node_reflow_text_func (void)
{
- gchar *tmp;
+ AsRefString *tmp;
/* plain text */
tmp = as_node_reflow_text ("Dave", -1);
g_assert_cmpstr (tmp, ==, "Dave");
- g_free (tmp);
+ as_ref_string_unref (tmp);
/* stripping */
tmp = as_node_reflow_text (" Dave ", -1);
g_assert_cmpstr (tmp, ==, "Dave");
- g_free (tmp);
+ as_ref_string_unref (tmp);
/* paragraph */
tmp = as_node_reflow_text ("Dave\n\nSoftware", -1);
g_assert_cmpstr (tmp, ==, "Dave\n\nSoftware");
- g_free (tmp);
+ as_ref_string_unref (tmp);
/* pathological */
tmp = as_node_reflow_text (
@@ -2258,7 +2258,7 @@ as_test_node_reflow_text_func (void)
" awesome.\n\n\n"
" Okay!\n", -1);
g_assert_cmpstr (tmp, ==, "Dave: Software is awesome.\n\nOkay!");
- g_free (tmp);
+ as_ref_string_unref (tmp);
}
static void