From 577ad8d07d027a161bb0482a3fbaa9a3552cfd83 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 14 Jun 2024 23:05:25 +0100 Subject: [PATCH] tests: Use g_assert_*() rather than g_assert() in notification tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It won’t get compiled out with `G_DISABLE_ASSERT`. Signed-off-by: Philip Withnall --- gio/tests/gnotification.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gio/tests/gnotification.c b/gio/tests/gnotification.c index 41cbb3d33..bde2efd3a 100644 --- a/gio/tests/gnotification.c +++ b/gio/tests/gnotification.c @@ -71,7 +71,7 @@ notification_received (GNotificationServer *server, { case 0: g_assert_cmpstr (notification_id, ==, "test1"); - g_assert (g_variant_lookup (notification, "title", "&s", &title)); + g_assert_true (g_variant_lookup (notification, "title", "&s", &title)); g_assert_cmpstr (title, ==, "Test"); break; @@ -88,7 +88,7 @@ notification_received (GNotificationServer *server, break; case 4: - g_assert (g_dbus_is_guid (notification_id)); + g_assert_true (g_dbus_is_guid (notification_id)); g_notification_server_stop (server); break; @@ -210,12 +210,12 @@ test_properties (void) g_assert_cmpstr (rn->title, ==, "title"); g_assert_cmpstr (rn->body, ==, "body"); - g_assert (G_IS_THEMED_ICON (rn->icon)); + g_assert_true (G_IS_THEMED_ICON (rn->icon)); names = g_themed_icon_get_names (G_THEMED_ICON (rn->icon)); g_assert_cmpstr (names[0], ==, "i-c-o-n"); g_assert_cmpstr (names[1], ==, "i-c-o-n-symbolic"); g_assert_null (names[2]); - g_assert (rn->priority == G_NOTIFICATION_PRIORITY_HIGH); + g_assert_cmpint (rn->priority, ==, G_NOTIFICATION_PRIORITY_HIGH); g_assert_cmpstr (rn->category, ==, "cate.gory"); g_assert_cmpint (rn->buttons->len, ==, 1);