Fix up failure-to-see-expected-message logging
authorDan Winship <danw@gnome.org>
Thu, 10 Apr 2014 15:37:23 +0000 (11:37 -0400)
committerDan Winship <danw@gnome.org>
Wed, 9 Jul 2014 14:48:34 +0000 (10:48 -0400)
commitbe0b921115c319186c678a054958f405b8c90a2b
treec518909243f09a7d18d65ab63fbaebfdb6ae0adf
parent5463c8cedbdf9ea2829f83c53876f21b34f57250
Fix up failure-to-see-expected-message logging

When GLib had been told to expect message X, but then actually saw
message Y, it would log the "did not see expected message" error with
message Y's log level and domain, which makes no sense. Change it to
log with domain "GLib" and G_LOG_LEVEL_CRITICAL instead.

Also, include the expected domain in the error message, so that if
that's the reason why the expectation didn't match, you can tell that
from the error message.

Update glib/tests/testing.c for these changes; for all other test
programs in GLib and elsewhere, this change should not break any
existing tests, it should only improve the output on failure.

https://bugzilla.gnome.org/show_bug.cgi?id=727974
glib/gmessages.c
glib/tests/testing.c