[libpeas] build: make g_assert() work from tests



commit a5e72d102a6b47f660f5679da9c1e30b5e86f727
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 28 10:43:07 2019 -0700

    build: make g_assert() work from tests

 tests/libpeas-gtk/meson.build  | 1 +
 tests/libpeas/meson.build      | 2 +-
 tests/testing-util/meson.build | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/tests/libpeas-gtk/meson.build b/tests/libpeas-gtk/meson.build
index ab5928a..a185110 100644
--- a/tests/libpeas-gtk/meson.build
+++ b/tests/libpeas-gtk/meson.build
@@ -26,6 +26,7 @@ foreach test: libpeas_gtk_tests_sources
   test_exe = executable(
     test_name,
     test_sources,
+    c_args: ['-UG_DISABLE_ASSERT', '-UG_DISABLE_CAST_CHECKS'],
     dependencies: libpeas_gtk_tests_deps
   )
 
diff --git a/tests/libpeas/meson.build b/tests/libpeas/meson.build
index 1af0061..edbfa64 100644
--- a/tests/libpeas/meson.build
+++ b/tests/libpeas/meson.build
@@ -6,7 +6,7 @@ libpeas_tests_sources = [
   ['plugin-info'],
 ]
 
-libpeas_tests_c_args = []
+libpeas_tests_c_args = ['-UG_DISABLE_ASSERT', '-UG_DISABLE_CAST_CHECKS']
 
 if build_lua51_loader == true
   libpeas_tests_sources += [['extension-lua', [lua51_dep]]]
diff --git a/tests/testing-util/meson.build b/tests/testing-util/meson.build
index 5486bc6..f8d48cb 100644
--- a/tests/testing-util/meson.build
+++ b/tests/testing-util/meson.build
@@ -19,6 +19,8 @@ libtesting_util_c_args = [
   '-DHAVE_CONFIG_H',
   '-DBUILDDIR="@0@"'.format(builddir),
   '-DSRCDIR="@0@"'.format(srcdir),
+  '-UG_DISABLE_ASSERT',
+  '-UG_DISABLE_CAST_CHECKS',
 ]
 
 libtesting_util_link_args = [


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]