tests: Use g_assert_*() rather than g_assert() in once

It won’t get compiled out with `G_DISABLE_ASSERT`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-06-07 09:24:13 +01:00
parent 5616e1b16e
commit c572d013a4

View File

@ -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);