HomeClusterLabs Projects

Test: libcrmcommon: use glib assertions properly

Description

Test: libcrmcommon: use glib assertions properly

The glib documentation says not to use g_assert() in unit tests, since it is a
no-op when compiling with G_DISABLE_ASSERT. Instead, the most relevant
g_assert_*() function should be used instead.

We only require glib 2.16.0 currently, so we can't use g_assert_true(),
g_assert_false(), g_assert_null(), or g_assert_nonnull().

Details

Provenance
kgaillotAuthored on Oct 5 2020, 12:57 PM
Parents
rP47b92ade59a7: Refactor: libcrmcommon: use pcmk__str_empty() where possible
Branches
Unknown
Tags
Unknown

Event Timeline