From 8b68de6ce69edd4bdef028f6941a9286ec14e191 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 5 May 2009 23:03:55 +0100 Subject: A ton more debugging messages to know where it failed --- tests/test-glib-layout-client.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'tests/test-glib-layout-client.c') 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 -- cgit v1.2.3