diff options
Diffstat (limited to 'test/test-utils.c')
-rw-r--r-- | test/test-utils.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test-utils.c b/test/test-utils.c index 9a4f3584..9686a9a8 100644 --- a/test/test-utils.c +++ b/test/test-utils.c @@ -7,6 +7,14 @@ #endif #ifdef DBUS_TEST_USE_INTERNAL +# define test_assert(x) _dbus_assert(x) +#elif defined(g_assert_true) +# define test_assert(x) g_assert_true(x) +#else +# define test_assert(x) g_assert(x) +#endif + +#ifdef DBUS_TEST_USE_INTERNAL typedef struct { @@ -390,3 +398,13 @@ void test_main_context_iterate (TestMainContext *ctx, g_main_context_iteration (ctx, may_block); #endif } + +void +test_pending_call_store_reply (DBusPendingCall *pc, + void *data) +{ + DBusMessage **message_p = data; + + *message_p = dbus_pending_call_steal_reply (pc); + test_assert (*message_p != NULL); +} |