diff options
author | Ted Gould <ted@canonical.com> | 2009-05-05 23:03:55 +0100 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-05-05 23:03:55 +0100 |
commit | 8b68de6ce69edd4bdef028f6941a9286ec14e191 (patch) | |
tree | 8f3b9d6f20a71611dab0c7d23c2ee65a40153018 /tests | |
parent | 17c8844b6418c3fe7c63b946dc184b819b7f469c (diff) | |
download | libdbusmenu-8b68de6ce69edd4bdef028f6941a9286ec14e191.tar.gz libdbusmenu-8b68de6ce69edd4bdef028f6941a9286ec14e191.tar.bz2 libdbusmenu-8b68de6ce69edd4bdef028f6941a9286ec14e191.zip |
A ton more debugging messages to know where it failed
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-glib-layout-client.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index 8f9b7eb..3620bb7 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -13,6 +13,7 @@ static gboolean verify_root_to_layout(DbusmenuMenuitem * mi, layout_t * layout) { if (layout->id != dbusmenu_menuitem_get_id(mi)) { + g_debug("Failed as ID %d is not equal to %d", layout->id, dbusmenu_menuitem_get_id(mi)); return FALSE; } @@ -22,6 +23,11 @@ verify_root_to_layout(DbusmenuMenuitem * mi, layout_t * layout) return TRUE; } if (children == NULL || layout->submenu == NULL) { + if (children == NULL) { + g_debug("Failed as there are no children but we have submenus"); + } else { + g_debug("Failed as we have children but no submenu"); + } return FALSE; } @@ -32,11 +38,16 @@ verify_root_to_layout(DbusmenuMenuitem * mi, layout_t * layout) } } - if (children != NULL || layout[i].id != 0) { - return FALSE; + if (children == NULL && layout[i].id == 0) { + return TRUE; } - return TRUE; + if (children != NULL) { + g_debug("Failed as there are still children but no submenus"); + } else { + g_debug("Failed as there are still submenus but no children"); + } + return FALSE; } static void |