[gtk/ebassi/issue-3864: 1/2] Disable G_DISABLE_ASSERT in gtk_test_init()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/issue-3864: 1/2] Disable G_DISABLE_ASSERT in gtk_test_init()
- Date: Mon, 12 Apr 2021 10:30:09 +0000 (UTC)
commit fe6622518983795c64f7a8eccb56a5fbd4715142
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Apr 12 11:09:11 2021 +0100
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.
gtk/gtktestutils.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]