mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-11 18:23:07 +02:00
gtestutils: Do not make a subtest to Bail out! the root one
This is something that a base test should decide, so if a subtest fails it's up to the caller to decide whether to bail out the whole suite or just the subtest.
This commit is contained in:
parent
f5f09445b8
commit
d8e4c1a8f8
@ -1219,16 +1219,7 @@ g_test_log (GTestLogType lbit,
|
|||||||
while ((line = strchr (line, '\n')))
|
while ((line = strchr (line, '\n')))
|
||||||
*(line++) = ' ';
|
*(line++) = ' ';
|
||||||
|
|
||||||
if (is_subtest ())
|
|
||||||
{
|
|
||||||
g_test_tap_print (subtest_level, FALSE, "Bail out! %s\n", message);
|
g_test_tap_print (subtest_level, FALSE, "Bail out! %s\n", message);
|
||||||
g_test_tap_print (0, FALSE, "Bail out!\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_test_tap_print (0, FALSE, "Bail out! %s\n", message);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (message);
|
g_free (message);
|
||||||
}
|
}
|
||||||
else if (g_test_verbose ())
|
else if (g_test_verbose ())
|
||||||
|
@ -2722,8 +2722,7 @@ test_tap_subtest_error (void)
|
|||||||
|
|
||||||
g_assert_cmpstr (interesting_lines, ==,
|
g_assert_cmpstr (interesting_lines, ==,
|
||||||
TAP_SUBTEST_PREFIX "Bail out! GLib-FATAL-ERROR: This should error out "
|
TAP_SUBTEST_PREFIX "Bail out! GLib-FATAL-ERROR: This should error out "
|
||||||
"Because it's just wrong!\n"
|
"Because it's just wrong!\n");
|
||||||
"Bail out!\n");
|
|
||||||
|
|
||||||
g_free (output);
|
g_free (output);
|
||||||
g_ptr_array_unref (argv);
|
g_ptr_array_unref (argv);
|
||||||
@ -2815,8 +2814,7 @@ test_tap_subtest_error_and_pass (void)
|
|||||||
|
|
||||||
g_assert_cmpstr (interesting_lines, ==,
|
g_assert_cmpstr (interesting_lines, ==,
|
||||||
TAP_SUBTEST_PREFIX "Bail out! GLib-FATAL-ERROR: This should error out "
|
TAP_SUBTEST_PREFIX "Bail out! GLib-FATAL-ERROR: This should error out "
|
||||||
"Because it's just wrong!\n"
|
"Because it's just wrong!\n");
|
||||||
"Bail out!\n");
|
|
||||||
|
|
||||||
g_free (output);
|
g_free (output);
|
||||||
g_ptr_array_unref (argv);
|
g_ptr_array_unref (argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user