summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-02-01 13:10:50 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2012-02-01 13:10:50 +0000
commitf5adf2d1141e4dfd3aeb9ca043825e66ba4a556e (patch)
tree29ffb9914d5344434e598792a236cf0cac889116
parenteecef2669555c65c20a01c55b7166593bac1d96b (diff)
test-helper: give sched_close_cb a more debuggable assertion
Asserting that wocky_porter_close_finish() returns TRUE is fine and all, but when it fails you get no information about why it failed. By passing a non-NULL GError ** parameter and asserting on that error first, we get the details of what actually happened immediately.
-rw-r--r--tests/wocky-test-helper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/wocky-test-helper.c b/tests/wocky-test-helper.c
index 665afeb..0acc7cf 100644
--- a/tests/wocky-test-helper.c
+++ b/tests/wocky-test-helper.c
@@ -208,8 +208,12 @@ sched_close_cb (GObject *source,
gpointer user_data)
{
test_data_t *test = (test_data_t *) user_data;
- g_assert (wocky_porter_close_finish (
- WOCKY_PORTER (source), res, NULL));
+ GError *error = NULL;
+ gboolean ret = wocky_porter_close_finish (
+ WOCKY_PORTER (source), res, &error);
+
+ g_assert_no_error (error);
+ g_assert (ret);
test->outstanding--;
g_main_loop_quit (test->loop);