diff options
author | Ted Gould <ted@gould.cx> | 2010-02-05 11:00:07 -0800 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-05 11:00:07 -0800 |
commit | c77ed1ccc280c56949b0a5a3f2d8d08bae498d29 (patch) | |
tree | 4b8cc5313c3c6828565df8efad57ab85d53f4d3a /tests/test-glib-properties-client.c | |
parent | a61a7ba8cc024d3d75f73e336ba83128631d3019 (diff) | |
parent | f3a13c8b0be55927b8b91ff37ba922ba323b44b7 (diff) | |
download | libdbusmenu-c77ed1ccc280c56949b0a5a3f2d8d08bae498d29.tar.gz libdbusmenu-c77ed1ccc280c56949b0a5a3f2d8d08bae498d29.tar.bz2 libdbusmenu-c77ed1ccc280c56949b0a5a3f2d8d08bae498d29.zip |
* Upstrem Merge
* Fixing handing of root IDs being zero
* Handling syncing of properties when reusing items
* Shipping new JSON files and READMEs for testing.
Diffstat (limited to 'tests/test-glib-properties-client.c')
-rw-r--r-- | tests/test-glib-properties-client.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test-glib-properties-client.c b/tests/test-glib-properties-client.c index 39815aa..434465a 100644 --- a/tests/test-glib-properties-client.c +++ b/tests/test-glib-properties-client.c @@ -60,8 +60,10 @@ verify_root_to_layout(DbusmenuMenuitem * mi, proplayout_t * layout) g_debug("Verifying ID: %d", layout->id); if (layout->id != dbusmenu_menuitem_get_id(mi)) { - g_debug("\tFailed as ID %d is not equal to %d", layout->id, dbusmenu_menuitem_get_id(mi)); - return FALSE; + if (!dbusmenu_menuitem_get_root(mi)) { + g_debug("\tFailed as ID %d is not equal to %d", layout->id, dbusmenu_menuitem_get_id(mi)); + return FALSE; + } } if (!verify_props(mi, layout->properties)) { @@ -85,13 +87,13 @@ verify_root_to_layout(DbusmenuMenuitem * mi, proplayout_t * layout) } guint i = 0; - for (i = 0; children != NULL && layout->submenu[i].id != 0; children = g_list_next(children), i++) { + for (i = 0; children != NULL && layout->submenu[i].id != -1; children = g_list_next(children), i++) { if (!verify_root_to_layout(DBUSMENU_MENUITEM(children->data), &layout->submenu[i])) { return FALSE; } } - if (children == NULL && layout->submenu[i].id == 0) { + if (children == NULL && layout->submenu[i].id == -1) { g_debug("\tPassed: %d", layout->id); return TRUE; } @@ -140,7 +142,7 @@ layout_verify_timer (gpointer data) layouton++; - if (layouts[layouton].id == 0) { + if (layouts[layouton].id == -1) { g_main_loop_quit(mainloop); } |