[glib: 7/8] gio: adding a g-icon test.



commit 00cc15881f0d6d39216520c442c5fa7a579610e2
Author: Jehan <jehan girinstud io>
Date:   Thu Jun 14 00:39:18 2018 +0200

    gio: adding a g-icon test.
    
    Using the same example as the comment for g_themed_icon_update_names().

 gio/tests/g-icon.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gio/tests/g-icon.c b/gio/tests/g-icon.c
index 3a45c3c26..7f87e4952 100644
--- a/gio/tests/g-icon.c
+++ b/gio/tests/g-icon.c
@@ -108,6 +108,15 @@ test_g_icon_to_string (void)
   g_object_unref (location);
 #endif
 
+  icon = g_themed_icon_new_with_default_fallbacks ("some-icon-symbolic");
+  g_themed_icon_append_name (G_THEMED_ICON (icon), "some-other-icon");
+  data = g_icon_to_string (icon);
+  g_assert_cmpstr (data, ==, ". GThemedIcon "
+                             "some-icon-symbolic some-symbolic some-other-icon some-other some "
+                             "some-icon some-other-icon-symbolic some-other-symbolic");
+  g_free (data);
+  g_object_unref (icon);
+
   icon = g_themed_icon_new ("network-server");
   data = g_icon_to_string (icon);
   g_assert_cmpstr (data, ==, ". GThemedIcon network-server network-server-symbolic");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]