From b8e3c5d00e80a2bf24cfbb063e2e4916ef01147d Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Mon, 8 Jan 2018 13:33:40 +0100 Subject: [PATCH] only use nonfatal assertions for GLib that actually supports it Fixes tests on Debian 7 and RHEL 6 --- tests/fe-common/core/test-formats.c | 2 ++ tests/irc/core/test-irc.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/fe-common/core/test-formats.c b/tests/fe-common/core/test-formats.c index 9ef23fd6..08d706ac 100644 --- a/tests/fe-common/core/test-formats.c +++ b/tests/fe-common/core/test-formats.c @@ -31,7 +31,9 @@ int main(int argc, char **argv) g_free(name); } +#if GLIB_CHECK_VERSION(2,38,0) g_test_set_nonfatal_assertions(); +#endif return g_test_run(); } diff --git a/tests/irc/core/test-irc.c b/tests/irc/core/test-irc.c index c96956df..3eaf7020 100644 --- a/tests/irc/core/test-irc.c +++ b/tests/irc/core/test-irc.c @@ -197,7 +197,9 @@ int main(int argc, char **argv) g_free(name); } +#if GLIB_CHECK_VERSION(2,38,0) g_test_set_nonfatal_assertions(); +#endif return g_test_run(); }