.Dd January 12, 2020 .Os libzt 0.3.1 .Dt ZT_TRUE 3 PRM .Sh NAME .Nm ZT_TRUE , .Nm zt_true .Nd construct a claim that a value is true .Sh SYNOPSIS .In zt.h .Bd -literal #define ZT_TRUE(value) \\ zt_true( \\ ZT_CURRENT_LOCATION(), \\ zt_pack_boolean((value), #value)) \\ .Ed .Ft zt_claim .Fo zt_true .Fa "zt_location location" .Fa "zt_value value" .Fc .Sh DESCRIPTION .Fn zt_true constructs a claim that a given value is true. It should be used through the macro .Fn ZT_TRUE , which passes source code location and packs argument. .Pp .Fn 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. .Sh IMPLEMENTATION NOTES .Fn ZT_TRUE evaluates .Em value only once. .Sh RETURN VALUES Both the macro and the function return a .Nm zt_claim structure with the appropriate attributes set. The returned claim is usually passed to .Fn zt_check or to .Fn zt_assert . .Sh SEE ALSO .Xr zt_assert 3 , .Xr zt_check 3 , .Xr zt_claim 3 , .Xr ZT_CMP_BOOL 3 , .Xr ZT_CMP_RUNE 3 , .Xr ZT_CMP_CSTR 3 , .Xr ZT_CMP_INT 3 , .Xr ZT_CMP_PTR 3 , .Xr ZT_CMP_UINT 3 , .Xr ZT_FALSE 3 , .Xr ZT_NOT_NULL 3 , .Xr ZT_NULL 3 .Xr zt_value 3 , .Sh HISTORY The .Fn ZT_TRUE macro and the .Fn zt_true function first appeared in libzt 0.1 .Sh AUTHORS .An "Zygmunt Krynicki" Aq Mt me@zygoon.pl