summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-04-12 11:09:11 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2021-04-12 11:29:53 +0100
commitfe6622518983795c64f7a8eccb56a5fbd4715142 (patch)
tree8d9649e1fa22eb811aae500b53d8a7474f97fce4
parent46ed7540b2719f803772b9d6583987cd806a7418 (diff)
downloadgtk+-fe6622518983795c64f7a8eccb56a5fbd4715142.tar.gz
Disable G_DISABLE_ASSERT in gtk_test_init()
If G_DISABLE_ASSERT is set when calling g_test_init(), the function will warn and break every test.
-rw-r--r--gtk/gtktestutils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 854e74fe6f..8cb53981b2 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -17,6 +17,14 @@
*/
+/* We need to remove G_DISABLE_ASSERT to ensure g_test_init() works;
+ * this needs to happen before we end up including glib.h, so we should
+ * do it as soon as possible.
+ */
+#ifdef G_DISABLE_ASSERT
+#undef G_DISABLE_ASSERT
+#endif
+
#include "config.h"
#include "gtkspinbutton.h"