From 4093321c9a831ae0be49e0aea70b6ef9ae906d46 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 28 Feb 2020 15:15:02 +0000 Subject: [PATCH] tests: Use g_assert_*() in cancellable test rather than g_assert() `g_assert()` is compiled out if `G_DISABLE_ASSERT` is defined, and `g_assert_*()` gives more detailed failure messages. Signed-off-by: Philip Withnall --- gio/tests/cancellable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/tests/cancellable.c b/gio/tests/cancellable.c index cd349a8f3..4ba9f6326 100644 --- a/gio/tests/cancellable.c +++ b/gio/tests/cancellable.c @@ -138,7 +138,7 @@ mock_operation_finish (GAsyncResult *result, MockOperationData *data; GTask *task; - g_assert (g_task_is_valid (result, NULL)); + g_assert_true (g_task_is_valid (result, NULL)); /* This test expects the return value to be iterations_done even * when an error is set. @@ -212,7 +212,7 @@ test_cancel_multiple_concurrent (void) if (g_test_verbose ()) g_printerr ("CANCEL: %d operations\n", num_async_operations); g_cancellable_cancel (cancellable); - g_assert (g_cancellable_is_cancelled (cancellable)); + g_assert_true (g_cancellable_is_cancelled (cancellable)); /* Wait for all operations to be cancelled */ g_main_loop_run (loop);