tests: expect critical on failure to remove source

We've added a g_critical() on failure to remove sources, so make sure we
expect to see that (instead of failing the test due to the unexpected
message).

https://bugzilla.gnome.org/show_bug.cgi?id=710724
This commit is contained in:
Ryan Lortie 2013-10-23 11:10:00 -04:00
parent b9de6f0489
commit f7beb90193

View File

@ -181,7 +181,9 @@ test_message (void)
test_message_cb1 (channel, G_IO_IN, tlb);
g_test_expect_message ("GLib", G_LOG_LEVEL_CRITICAL, "Source ID*");
g_assert (!g_source_remove (child_source));
g_test_assert_expected_messages ();
g_assert (g_source_remove (io_source));
g_io_channel_unref (channel);
@ -292,7 +294,9 @@ test_error (void)
test_message_cb1 (channel, G_IO_IN, tlb);
g_test_expect_message ("GLib", G_LOG_LEVEL_CRITICAL, "Source ID*");
g_assert (!g_source_remove (child_source));
g_test_assert_expected_messages ();
g_assert (g_source_remove (io_source));
g_io_channel_unref (channel);