projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
26a1056
)
Improve GIcon test coverage
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 3 Jun 2012 23:50:54 +0000
(19:50 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Mon, 4 Jun 2012 10:04:27 +0000
(06:04 -0400)
gio/tests/g-icon.c
patch
|
blob
|
history
diff --git
a/gio/tests/g-icon.c
b/gio/tests/g-icon.c
index
a360c28
..
5c9778d
100644
(file)
--- a/
gio/tests/g-icon.c
+++ b/
gio/tests/g-icon.c
@@
-287,6
+287,7
@@
test_emblemed_icon (void)
GIcon *icon1, *icon2, *icon3, *icon4;
GEmblem *emblem, *emblem1, *emblem2;
GList *emblems;
GIcon *icon1, *icon2, *icon3, *icon4;
GEmblem *emblem, *emblem1, *emblem2;
GList *emblems;
+ GIcon *icon;
icon1 = g_themed_icon_new ("testicon");
icon2 = g_themed_icon_new ("testemblem");
icon1 = g_themed_icon_new ("testicon");
icon2 = g_themed_icon_new ("testemblem");
@@
-313,6
+314,14
@@
test_emblemed_icon (void)
g_assert (g_emblem_get_icon (emblem) == icon2);
g_assert (g_emblem_get_origin (emblem) == G_EMBLEM_ORIGIN_UNKNOWN);
g_assert (g_emblem_get_icon (emblem) == icon2);
g_assert (g_emblem_get_origin (emblem) == G_EMBLEM_ORIGIN_UNKNOWN);
+ g_emblemed_icon_clear_emblems (G_EMBLEMED_ICON (icon4));
+ g_assert (g_emblemed_icon_get_emblems (G_EMBLEMED_ICON (icon4)) == NULL);
+
+ g_assert (g_icon_hash (icon4) != g_icon_hash (icon2));
+ g_object_get (icon4, "gicon", &icon, NULL);
+ g_assert (icon == icon1);
+ g_object_unref (icon);
+
g_object_unref (icon1);
g_object_unref (icon2);
g_object_unref (icon3);
g_object_unref (icon1);
g_object_unref (icon2);
g_object_unref (icon3);