mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 11:56:16 +01:00
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:
parent
5616e1b16e
commit
c572d013a4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user