gobject/tests: use g_test_expect_messages()

https://bugzilla.gnome.org/show_bug.cgi?id=682560
This commit is contained in:
Dan Winship
2012-08-27 07:45:08 -04:00
parent 7972485ca1
commit e0cba35d41
3 changed files with 17 additions and 17 deletions

View File

@@ -482,15 +482,14 @@ test_interface_default_init (TestInterfaceInterface *iface)
continue;
/* we think that this is impossible. make sure. */
if (g_test_trap_fork (G_TIME_SPAN_SECOND, G_TEST_TRAP_SILENCE_STDERR))
{
GParamSpec *pspec;
pspec = g_param_spec_object ("xyz", "xyz", "xyz", types[i], j);
pspec = g_param_spec_object ("xyz", "xyz", "xyz", types[i], j);
g_object_interface_install_property (iface, pspec);
exit (0);
}
g_test_trap_assert_failed ();
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
"*assertion*pspec->flags*failed*");
g_object_interface_install_property (iface, pspec);
g_test_assert_expected_messages ();
g_param_spec_unref (pspec);
continue;
}