ZT_TRUE3
Construct a claim that a value is true
Usage
#include <zt.h>
#define ZT_TRUE(value) \
zt_true( \
ZT_CURRENT_LOCATION(), \
zt_pack_boolean((value), #value)) \
zt_claim
zt_true(zt_location location, zt_value value);
Overview
zt_true() constructs a claim that a given value is true. It should be used through the macro ZT_TRUE(), which passes source code location and packs argument.
zt_true() can be used to check custom properties by calling arbitrary verification logic. The disadvantage of this approach is that on failure, the error message cannot precisely explain the problem.
Implementation notes
ZT_TRUE() evaluates value only once.
Return values
Both the macro and the function return a zt_claim structure with the appropriate attributes set. The returned claim is usually passed to zt_check() or to zt_assert().
Releases
Unchanged in 3 releases since Debian 11 (Bullseye).