Skip to content

test: Explicitly enable assertion macros

Simon McVittie requested to merge wip/smcv/assert-control into master

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 (closed)

Merge request reports