mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 04:15:49 +01:00
tests: Add some missing main context iterations to gdbus-names
These were missing from the test before the previous commit ported from `GMainLoop` to `GMainContext`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
32e8e4ad91
commit
323c5d7e21
@ -773,7 +773,11 @@ test_bus_watch_name (gconstpointer d)
|
|||||||
|
|
||||||
g_assert_cmpint (data.num_appeared, ==, 0);
|
g_assert_cmpint (data.num_appeared, ==, 0);
|
||||||
g_assert_cmpint (data.num_vanished, ==, 1);
|
g_assert_cmpint (data.num_vanished, ==, 1);
|
||||||
|
|
||||||
g_bus_unwatch_name (id);
|
g_bus_unwatch_name (id);
|
||||||
|
while (data.num_free_func < 1)
|
||||||
|
g_main_context_iteration (main_context, TRUE);
|
||||||
|
|
||||||
g_assert_cmpint (data.num_appeared, ==, 0);
|
g_assert_cmpint (data.num_appeared, ==, 0);
|
||||||
g_assert_cmpint (data.num_vanished, ==, 1);
|
g_assert_cmpint (data.num_vanished, ==, 1);
|
||||||
g_assert_cmpint (data.num_free_func, ==, 1);
|
g_assert_cmpint (data.num_free_func, ==, 1);
|
||||||
@ -845,6 +849,9 @@ test_bus_watch_name (gconstpointer d)
|
|||||||
* Unwatch the name.
|
* Unwatch the name.
|
||||||
*/
|
*/
|
||||||
g_bus_unwatch_name (id);
|
g_bus_unwatch_name (id);
|
||||||
|
while (data.num_free_func < 1)
|
||||||
|
g_main_context_iteration (main_context, TRUE);
|
||||||
|
|
||||||
g_assert_cmpint (data.num_free_func, ==, 1);
|
g_assert_cmpint (data.num_free_func, ==, 1);
|
||||||
|
|
||||||
/* unown the name */
|
/* unown the name */
|
||||||
@ -952,7 +959,11 @@ test_bus_watch_name (gconstpointer d)
|
|||||||
g_assert_cmpint (own_data.num_lost, ==, 0);
|
g_assert_cmpint (own_data.num_lost, ==, 0);
|
||||||
g_assert_cmpint (data.num_vanished, ==, 1);
|
g_assert_cmpint (data.num_vanished, ==, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_bus_unwatch_name (id);
|
g_bus_unwatch_name (id);
|
||||||
|
while (data.num_free_func < 1)
|
||||||
|
g_main_context_iteration (main_context, TRUE);
|
||||||
|
|
||||||
g_assert_cmpint (data.num_free_func, ==, 1);
|
g_assert_cmpint (data.num_free_func, ==, 1);
|
||||||
|
|
||||||
if (!watch_name_test->existing_service)
|
if (!watch_name_test->existing_service)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user