From c572d013a41124be8dbdbdca1f691cb93a375f81 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 7 Jun 2022 09:24:13 +0100 Subject: [PATCH] tests: Use g_assert_*() rather than g_assert() in once 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 --- glib/tests/once.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/tests/once.c b/glib/tests/once.c index 4d6ddf97c..d0aeccb74 100644 --- a/glib/tests/once.c +++ b/glib/tests/once.c @@ -48,12 +48,12 @@ test_once_single_threaded (void) g_test_summary ("Test g_once() usage from a single thread"); - g_assert (once.status == G_ONCE_STATUS_NOTCALLED); + g_assert_cmpint (once.status, ==, G_ONCE_STATUS_NOTCALLED); res = g_once (&once, do_once, NULL); g_assert_cmpint (GPOINTER_TO_INT (res), ==, 1); - g_assert (once.status == G_ONCE_STATUS_READY); + g_assert_cmpint (once.status, ==, G_ONCE_STATUS_READY); res = g_once (&once, do_once, NULL); g_assert_cmpint (GPOINTER_TO_INT (res), ==, 1);