[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:12:27 +0000 (UTC)
commit 47aa6cf15688879cf2d0de6c7a15120d533eabbb
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 | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 854e74fe6f..bc11adfdae 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -55,6 +55,11 @@
#include <gdk/x11/gdkx.h>
#endif
+/* We need to remove G_DISABLE_ASSERT to ensure g_test_init() works */
+#ifdef G_DISABLE_ASSERT
+#undef G_DISABLE_ASSERT
+#endif
+
/**
* gtk_test_init:
* @argcp: Address of the `argc` parameter of the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]