[glib/fix-gobject-signals-test-windows: 3/3] gobject/tests/signals.c: Fix tests on Windows
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/fix-gobject-signals-test-windows: 3/3] gobject/tests/signals.c: Fix tests on Windows
- Date: Mon, 24 Jun 2019 15:59:22 +0000 (UTC)
commit ae8e003581303e6a749d50127ad77376a6dc9aaa
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jun 24 11:42:14 2019 +0800
gobject/tests/signals.c: Fix tests on Windows
On Windows and possibly other platforms the '%p' printf modifier does
not prefix printed values with '0x', so do not expect the warning
message to contain the '0x' prefix for the handler pointer value.
gobject/tests/signals.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gobject/tests/signals.c b/gobject/tests/signals.c
index 63ce86ea1..9ad653e25 100644
--- a/gobject/tests/signals.c
+++ b/gobject/tests/signals.c
@@ -1266,8 +1266,10 @@ test_clear_signal_handler (void)
if (g_test_undefined ())
{
handler = g_random_int_range (0x01, 0xFF);
+
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
- "*instance '0x* has no handler with id *'");
+ "*instance '* has no handler with id *'");
+
g_clear_signal_handler (&handler, test_obj);
g_assert_cmpuint (handler, ==, 0);
g_test_assert_expected_messages ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]