tests: don't assert for initialized tests in g_test_assert_expected_messages()

We call _nmtst_exit() atexit(), which in turn calls g_test_assert_expected_messages().
We must not assert there against initialized tests.

  $ ./src/platform/tests/monitor -h
  Usage:
    ./src/platform/tests/monitor [OPTION...]
  **
  NetworkManager:ERROR:monitor.c:11:_nmtst_exit: assertion failed: (nmtst_initialized ())
  Aborted (core dumped)
This commit is contained in:
Thomas Haller 2015-12-12 12:56:23 +01:00
parent 8a38b4dd13
commit e934bfb5d8

View file

@ -639,7 +639,6 @@ nmtst_test_quick (void)
const char *_func = (func); \
int _line = (line); \
\
g_assert (nmtst_initialized ()); \
if (__nmtst_internal.assert_logging && __nmtst_internal.no_expect_message) \
g_debug ("nmtst: assert-logging: g_test_assert_expected_messages(%s, %s:%d, %s)", _domain?:"", _file?:"", _line, _func?:""); \
\