[gtk/testsuite-asserts: 8/13] Make gtk_test_init work without assertions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/testsuite-asserts: 8/13] Make gtk_test_init work without assertions
- Date: Tue, 13 Apr 2021 02:12:07 +0000 (UTC)
commit 13ece4ee9bd5caf1c32d7b225c1dabae04735050
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 12 20:57:02 2021 -0400
Make gtk_test_init work without assertions
The g_test_init macro 'helpfully' refuses to work when
assertions are disabled. So we just use the function.
gtk/gtktestutils.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 854e74fe6f..6bcd1192c4 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -80,7 +80,10 @@ gtk_test_init (int *argcp,
char ***argvp,
...)
{
- g_test_init (argcp, argvp, NULL);
+ /* g_test_init is defined as a macro that aborts if assertions
+ * are disabled. We don't want that, so we call the function.
+ */
+ (g_test_init) (argcp, argvp, NULL);
gtk_disable_setlocale();
setlocale (LC_ALL, "en_US.UTF-8");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]