The verification system is comprised of the following chain of cooperating elements. For example a
trivial integer relationship assertion behaves as follows. ZT_CMP_INT(), or another similar macro,
invokes zt_cmp_int(), providing source code location as zt_location, and packaging specific types into
common variant type zt_value. The result is a zt_claim which is then passed to zt_assert() or zt_check()
for evaluation.
The roles of all the essential types and functions is summarized below.
•zt_value captures values expressed in a test case
•zt_claim transports up to three values and an opaque verifier
•zt_check() and zt_assert() validate the claim by instantiating zt_verifier.•zt_verifier (private) wraps a verification function, including the arity and expected kind of each
argument.
•zt_arg_info (private) pairs expected argument kind with a customized error message used on kind
mismatch.
•zt_verify_claim() (private) ensures verifier function arity and argument kind matches what is encoded
in the claim and invokes the verifier function.
• The specific verifier function inspects the argument and performs the actual verification of the
desired property that the test is measuring.
•zt_test (private) keeps track of test outcome, provides a stream for writing error messages and
assists in performing non-local exit.