mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-04 20:59:21 +02:00
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:
@@ -345,6 +345,9 @@ const char * g_test_get_path (void);
|
||||
/* tell about failure */
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
void g_test_fail (void);
|
||||
GLIB_AVAILABLE_IN_2_70
|
||||
void g_test_fail_printf (const char *format,
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
void g_test_incomplete (const gchar *msg);
|
||||
GLIB_AVAILABLE_IN_2_70
|
||||
|
Reference in New Issue
Block a user