mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-24 01:48:53 +02:00
Bug 579050 Allow making selected critical and warning messages non-fatal
Implement g_test_log_set_fatal_handler which is a function similar to g_log_set_default_handler but for use in unit tests where certain errors have to be ignored because it is not possible to fix or avoid them otherwise. A unit test is added.
This commit is contained in:
committed by
Christian Dywan
parent
4b1217b7e0
commit
278ac0a45d
@@ -1122,6 +1122,7 @@ test_case_run (GTestCase *tc)
|
||||
void *fixture;
|
||||
g_test_log (G_TEST_LOG_START_CASE, test_run_name, NULL, 0, NULL);
|
||||
test_run_forks = 0;
|
||||
g_test_log_set_fatal_handler (NULL, NULL);
|
||||
g_timer_start (test_run_timer);
|
||||
fixture = tc->fixture_size ? g_malloc0 (tc->fixture_size) : tc->test_data;
|
||||
test_run_seed (test_run_seedstr);
|
||||
|
Reference in New Issue
Block a user