ZT_CMP_BOOL3
Construct a claim of a relation between two booleans
Usage
#include <zt.h>
#define ZT_CMP_BOOL(left, rel, right) \
zt_cmp_bool( \
ZT_CURRENT_LOCATION(), \
zt_pack_boolean((left), (#left)), \
zt_pack_string((#rel), (#rel)), \
zt_pack_boolean((right), (#right)))
zt_claim
zt_cmp_bool(zt_location location, zt_value left, zt_value rel, zt_value right);
Overview
zt_cmp_bool() constructs a claim of a relation between two booleans. It should be used through the macro ZT_CMP_BOOL() which passes source code location and packs arguments.
The relation must be either == or !=.
It may be more natural to use ZT_TRUE() or ZT_FALSE() instead.
Implementation notes
ZT_CMP_BOOL() evaluates left and right exactly once.
Return values
Both the macro and the function return a claim structure with the right attributes set. The returned claim is usually passed to zt_check() or to zt_assert().
Releases
Unchanged in 3 releases since Debian 11 (Bullseye).