zt_visitor, zt_visitor_vtab — interface for discovering test suites and test cases
Contents
Description
zt_visitor is an interface for exploring test suites and test cases. The visitor type is used as an
argument to all test suites. Test suites can enumerate test cases and other test suites. It is a part of
the implementation and is not expected to be implemented by library users.
zt_visitor_vtab is an opaque type comprised of functions that define the interface. The interface is only
used internally so the implementation is private.
History
zt_visitor first appeared in libzt 0.1
Implementation Notes
Interface values combine an object pointer with a function table pointer and are passed by value.
An interface can use the NULL pointer as an object pointer if there is no need to refer to any data
specific to an instance. The function table pointer cannot be null as it defines the unique aspect of the
implementation.
Name
zt_visitor, zt_visitor_vtab — interface for discovering test suites and test cases
See Also
zt_visit_test_case(3), zt_visit_test_suite(3)
Synopsis
#include<zt.h>typedefstructzt_visitor{...}zt_visitor;TypeEntryDescriptionvoid* id Object implementing the interface
structzt_visitor_vtab* vtab Table of interface functions
