Scroll to navigation

zt_visitor(3) Library Functions Manual (prm) zt_visitor(3)

NAME

zt_visitor, zt_visitor_vtabinterface for discovering test suites and test cases

SYNOPSIS

#include <zt.h>

typedef struct zt_visitor { ... } zt_visitor;

void * id Object implementing the interface
struct zt_visitor_vtab * vtab Table of interface functions

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.

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.

SEE ALSO

zt_visit_test_case(3), zt_visit_test_suite(3)

HISTORY

zt_visitor first appeared in libzt 0.1

AUTHORS

Zygmunt Krynicki <me@zygoon.pl>

January 12, 2020 libzt 0.3.1