gio: adding a g-icon test.

Using the same example as the comment for g_themed_icon_update_names().
This commit is contained in:
Jehan 2018-06-14 00:39:18 +02:00
parent ab53a54632
commit 00cc15881f

View File

@ -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");