[glib: 1/3] tests: Use g_assert_*() in cancellable test rather than g_assert()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/3] tests: Use g_assert_*() in cancellable test rather than g_assert()
- Date: Thu, 9 Apr 2020 12:01:09 +0000 (UTC)
commit 4093321c9a831ae0be49e0aea70b6ef9ae906d46
Author: Philip Withnall <withnall endlessm com>
Date: Fri Feb 28 15:15:02 2020 +0000
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 <withnall endlessm com>
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]