shared/tests: add nmtst_main_loop_run_assert() helper

This commit is contained in:
Thomas Haller 2021-01-22 13:04:31 +01:00
parent 6b18fc252d
commit 779ee32263
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -1194,6 +1194,14 @@ nmtst_main_loop_run(GMainLoop *loop, guint timeout_msec)
return loopx != NULL;
}
#define nmtst_main_loop_run_assert(loop, timeout_msec) \
G_STMT_START \
{ \
if (!nmtst_main_loop_run((loop), (timeout_msec))) \
g_assert_not_reached(); \
} \
G_STMT_END
static inline void
_nmtst_main_loop_quit_on_notify(GObject *object, GParamSpec *pspec, gpointer user_data)
{