logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ZT_FALSE, zt_false — construct a claim that a value is false

Authors

       Zygmunt Krynicki <me@zygoon.pl>

libzt 0.3.1                                     January 12, 2020                                     ZT_FALSE(3)

Description

zt_false()  constructs  a  claim  that  a  given  value  is  false.  It  should be used through the macro
       ZT_FALSE(), which passes source code location and packs argument.

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

History

       The ZT_FALSE() macro and the zt_false() function first appeared in libzt 0.1

Implementation Notes

ZT_FALSE() evaluates value only once.

Name

       ZT_FALSE, zt_false — construct a claim that a value is false

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

See Also

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

Synopsis

#include<zt.h>

       #define ZT_FALSE(value) \
         zt_false( \
           ZT_CURRENT_LOCATION(), \
           zt_pack_boolean((value), #value)) \

       zt_claimzt_false(zt_locationlocation, zt_valuevalue);

See Also