mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01:00
tests: Make use of g_test_fail_message()
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
a076dbcb68
commit
052e335500
@ -482,8 +482,7 @@ assert_strings_equivalent (const gchar *expected,
|
||||
if (g_str_equal (expected_words[i], result_words[j]))
|
||||
goto got_it;
|
||||
|
||||
g_test_message ("Unable to find expected string '%s' in result '%s'", expected_words[i], result);
|
||||
g_test_fail ();
|
||||
g_test_fail_printf ("Unable to find expected string '%s' in result '%s'", expected_words[i], result);
|
||||
|
||||
got_it:
|
||||
continue;
|
||||
|
@ -435,9 +435,8 @@ expect_log_writer (GLogLevelFlags log_level,
|
||||
char *str;
|
||||
|
||||
str = g_log_writer_format_fields (log_level, fields, n_fields, FALSE);
|
||||
g_test_message ("Unexpected message: %s", str);
|
||||
g_test_fail_printf ("Unexpected message: %s", str);
|
||||
g_free (str);
|
||||
g_test_fail ();
|
||||
}
|
||||
|
||||
return G_LOG_WRITER_HANDLED;
|
||||
@ -529,9 +528,8 @@ test_structured_logging_roundtrip1 (void)
|
||||
ExpectedMessage *expected = expected_messages->data;
|
||||
|
||||
str = g_log_writer_format_fields (0, expected->fields, expected->n_fields, FALSE);
|
||||
g_test_message ("Unexpected message: %s", str);
|
||||
g_test_fail_printf ("Unexpected message: %s", str);
|
||||
g_free (str);
|
||||
g_test_fail ();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user