From 0324be20485b1c4f2f558ad7b6cf7ffafaaba6ad Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 20 Nov 2007 15:01:00 +0000 Subject: [PATCH] glib/gtestframework.c: g_test_init(): make warnings and criticals fatal for all test programs. svn path=/trunk/; revision=5909 --- glib/gtestframework.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glib/gtestframework.c b/glib/gtestframework.c index f025fe3..78acd3e 100644 --- a/glib/gtestframework.c +++ b/glib/gtestframework.c @@ -369,6 +369,10 @@ g_test_init (int *argc, static char seedstr[4 + 4 * 8 + 1]; va_list args; gpointer vararg1; + /* make warnings and criticals fatal for all test programs */ + GLogLevelFlags fatal_mask = (GLogLevelFlags) g_log_set_always_fatal ((GLogLevelFlags) G_LOG_FATAL_MASK); + fatal_mask = (GLogLevelFlags) (fatal_mask | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); + /* check caller args */ g_return_if_fail (argc != NULL); g_return_if_fail (argv != NULL); g_return_if_fail (g_test_config_vars == NULL); -- 2.7.4