gtestutils: Allow failing a test with a printf-style message

This allows a pattern like

    g_test_message ("cannot reticulate splines: %s", error->message);
    g_test_fail ();

to be replaced by the simpler

    g_test_fail_printf ("cannot reticulate splines: %s", error->message);

with the secondary benefit of making the message available to TAP
consumers as part of the "not ok" message.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2021-08-05 11:42:22 +01:00
parent 26fbd14954
commit a076dbcb68
5 changed files with 66 additions and 0 deletions

View File

@@ -3569,6 +3569,7 @@ g_test_get_filename
g_test_get_dir
g_test_fail
g_test_fail_printf
g_test_skip
g_test_skip_printf
g_test_incomplete