DOKK / manpages / debian 11 / libzt-doc / ZT_CMP_UINT.3.en
ZT_CMP_UINT(3) Library Functions Manual (prm) ZT_CMP_UINT(3)

ZT_CMP_UINT, zt_cmp_uintconstruct a claim of a relation between two unsigned integers

#include <zt.h>

#define ZT_CMP_UINT(left, rel, right) \
  zt_cmp_uint( \
    ZT_CURRENT_LOCATION(), \
    zt_pack_unsigned((left), (#left)), \
    zt_pack_string((#rel), (#rel)), \
    zt_pack_unsigned((right), (#right)))

zt_claim
zt_cmp_uint(zt_location location, zt_value left, zt_value rel, zt_value right);

() constructs a claim of a relation between two unsigned integers. It should be used through the macro () which passes source code location and packs arguments.

The relation must be one of , , , , or .

ZT_CMP_UINT() evaluates and exactly once.

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().

ZT_CMP_BOOL(3), ZT_CMP_RUNE(3), ZT_CMP_CSTR(3), ZT_CMP_PTR(3), ZT_CMP_UINT(3), ZT_FALSE(3), ZT_NOT_NULL(3), ZT_NULL(3), ZT_TRUE(3), zt_check(3),

The ZT_CMP_UINT() macro and the zt_cmp_uint() function first appeared in libzt 0.1

Since libzt 0.3 zt_cmp_uint() internally promotes left and right arguments from ZT_UNSIGNED to ZT_UINTMAX.

Zygmunt Krynicki <me@zygoon.pl>

January 12, 2020 libzt 0.3.1