HomeClusterLabs Projects

Doc: libcrmcommon: pcmk__assert_asserts() accepts a statement

Description

Doc: libcrmcommon: pcmk__assert_asserts() accepts a statement

Clarify in doc comment that pcmk__assert_asserts() accepts a statement
in general, rather than just an expression. An expression is also valid:
it will be used as an expression statement.

This is important because when cmocka's expect_* and will_return macros
are used along with pcmk__assert_asserts(), they must be called within
the child and not within the parent. Otherwise, the values won't be
removed from the queue in the parent, and the test will fail.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Aug 20 2022, 4:57 PM
Parents
rPbf6d34bbd0cf: Test: libcrmcommon: Check expectations in mocked getenv()
Branches
Unknown
Tags
Unknown