Man page - zt_value(3)
Packages contas this manual
- zt_pack_boolean(3)
- zt_main(3)
- zt_location_at(3)
- zt_pack_unsigned(3)
- zt_test_case_func(3)
- zt_pack_nothing(3)
- zt_test_suite_func(3)
- zt_check(3)
- zt_pack_rune(3)
- zt_visit_test_case(3)
- zt_value(3)
- zt_pack_string(3)
- zt_pack_pointer(3)
- zt_claim(3)
- libzt(3)
- zt_visitor(3)
- zt_test(3)
- zt_location(3)
- zt_pack_integer(3)
apt-get install libzt-doc
Manual
| zt_value(3) | Library Functions Manual (prm) | zt_value(3) |
NAME
zt_value,
zt_value_kind, — variant
type for passing data into claim verifiers
SYNOPSIS
#include
<zt.h>
typedef struct zt_value { ... } zt_value;
| Type | Entry | Description |
| zt_value_kind | kind | Discriminator for the union |
| const char * | source | Source code used to compute the value |
| union { ... } | as | Union containing the actual value |
| bool | as.boolean | Value when used as ZT_BOOLEAN |
| int | as.integer | Value when used as ZT_INTEGER |
| unsigned | as.unsigned_integer | Value when used as ZT_UNSIGNED |
| int | as.rune | Value when used as ZT_RUNE |
| const char * | as.string | Value when used as ZT_STRING |
| const void * | as.pointer | Value when used as ZT_POINTER |
| intmax_t | as.intmax | Value when used as ZT_INTMAX |
| uintmax_t | as.uintmax | Value when used as ZT_UINTMAX |
typedef enum zt_value_kind { ... } zt_value_kind;
| Kind | Description |
| ZT_NOTHING | Placeholder for unused values |
| ZT_BOOLEAN | zt_value.as.boolean is valid |
| ZT_INTEGER | zt_value.as.integer is valid (deprecated) |
| ZT_UNSIGNED | zt_value.as.unsigned_integer is valid (deprecated) |
| ZT_RUNE | zt_value.as.rune is valid |
| ZT_STRING | zt_value.as.string is valid |
| ZT_POINTER | zt_value.as.pointer is valid |
| ZT_INTMAX | zt_value.as.intmax is valid |
| ZT_UINTMAX | zt_value.as.uintmax is valid |
DESCRIPTION
zt_value is a variant-like type that is
used to pass values around libzt internals. It is comprised of the
kind
enumeration, the
as union as
well as the
source
string.
zt_value_kind describes type of
verification function arguments.
IMPLEMENTATION NOTES
zt_value exists to pass packed values of
several types from the test source code, through the
zt_claim type and into private verification
functions that determine test outcome.
Tests using binary relations encode the operator as an argument of kind ZT_STRING.
BUGS
On some architectures ZT_INTEGER and
ZT_UNSIGNED are too short to handle
size_t and ssize_t values
correctly. They are now deprecated and automatically promoted to
ZT_INTMAX and ZT_UINTMAX
respectively.
SEE ALSO
HISTORY
zt_value and
zt_value_kind first appeared in libzt 0.1
ZT_INTMAX,
ZT_UINTMAX and the corresponding union members first
appeared in libzt 0.3.
AUTHORS
Zygmunt Krynicki <me@zygoon.pl>
| January 12, 2020 | libzt 0.3.1 |