diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-12-16 18:54:29 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-12-16 18:54:29 +0000 |
commit | 13638f7d1bd48d4e2fde4bab6fa77563d2604ed6 (patch) | |
tree | ee18746f872af65cab7ab35341159b98ecf33d82 | |
parent | 95cd35028fec0239cfe05ece3f571d055ff6e501 (diff) |
fix a typo in the test, and make even more assertions
-rw-r--r-- | tests/dbus/dbus.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/dbus/dbus.c b/tests/dbus/dbus.c index 842b47ad1..af81645e2 100644 --- a/tests/dbus/dbus.c +++ b/tests/dbus/dbus.c @@ -255,7 +255,7 @@ test_watch_name_owner (void) #define N_CALLBACK_PAIRS 5 gboolean callbacks_fired[N_CALLBACK_PAIRS] = { FALSE, FALSE, FALSE, FALSE, FALSE }; -/* Overwritten with "-" when "freed" */ +/* Overwritten with '.' when "freed" */ gchar user_data_flags[N_CALLBACK_PAIRS * 2 + 1] = "0123456789"; static void @@ -267,6 +267,7 @@ free_fake_user_data (gpointer user_data) g_error ("Double 'free' of user-data %u. Still to free: %s", i, user_data_flags); + g_assert_cmpuint ((guint) user_data_flags[i], ==, i + '0'); user_data_flags[i] = '.'; } @@ -310,8 +311,11 @@ cancel_watch_during_dispatch (void) tp_dbus_daemon_request_name (bus, "ca.bbf3", FALSE, NULL); for (i = 0; i < N_CALLBACK_PAIRS * 2; i++) - tp_dbus_daemon_watch_name_owner (bus, "ca.bbf3", bbf3_performed_cb, - GUINT_TO_POINTER (i), free_fake_user_data); + { + tp_dbus_daemon_watch_name_owner (bus, "ca.bbf3", bbf3_performed_cb, + GUINT_TO_POINTER (i), free_fake_user_data); + g_assert_cmpuint ((guint) user_data_flags[i], ==, i + '0'); + } mainloop = g_main_loop_new (NULL, FALSE); g_main_loop_run (mainloop); |