diff options
author | Simon McVittie <smcv@collabora.com> | 2021-03-26 13:52:38 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2021-03-26 14:00:19 +0000 |
commit | a9cfc4ce439aed41cac84d342d088cef3ec83ae4 (patch) | |
tree | bf589227d3738ae8cbb53776873c09056ed19467 /test/core/test-dbus-glib.c | |
parent | 0383264db07b2bc4519719b34111bd6f939f0fe2 (diff) | |
download | dbus-glib-a9cfc4ce439aed41cac84d342d088cef3ec83ae4.tar.gz |
test: Explicitly enable assertion macros
To allow dbus-glib to be built with G_DISABLE_ASSERT defined but tests
enabled (--disable-asserts --enable-tests), we need to explicitly
undefine it when building the tests, otherwise g_test_init() turns
into an abort since GLib 2.58.
We no longer actually use g_assert() for test-only code, so we can
remove the warning about tests' failing results not being reported.
test-profile.c still leaves assertions disabled: it does not use
g_test_init(), and it is intended to be used for profiling, where the
overhead of assertions is potentially significant.
Resolves: #16
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/core/test-dbus-glib.c')
-rw-r--r-- | test/core/test-dbus-glib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/core/test-dbus-glib.c b/test/core/test-dbus-glib.c index 1a544d5..629830d 100644 --- a/test/core/test-dbus-glib.c +++ b/test/core/test-dbus-glib.c @@ -27,6 +27,7 @@ */ #include <config.h> +#undef G_DISABLE_ASSERT /* -*- mode: C; c-file-style: "gnu" -*- */ #include <dbus/dbus-glib.h> |