zt_visitor(3)

zt_visitor3

Interface for discovering test suites and test cases

Usage

#include <zt.h>

typedef struct zt_visitor { ... } zt_visitor;

TypeEntryDescription
void *idObject implementing the interface
struct zt_visitor_vtab *vtabTable of interface functions

Overview

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.

Releases

Unchanged in 3 releases since Debian 11 (Bullseye).

  1. 11–13

History

zt_visitor first appeared in libzt 0.1

Authors

Zygmunt Krynicki ⟨[email protected]⟩

From libzt-doc 0.3.1-4 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.