---
name: "zt_test"
section: "3"
platform: "linux"
package: "libzt-doc"
version: "0.3.1-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/zt_test"
---

# zt\_test(3)

private representation of test state

## NAME

**zt\_test**, **zt\_t** – private representation of test state

## SYNOPSIS

*struct* *zt\_test* *typedef* *struct* *zt\_test* *\*zt\_t*

## DESCRIPTION

**zt\_test** is an opaque type that holds test state during execution. The test type is passed as an argument to each test function.  It is further passed to both **zt\_check**() and **zt\_assert**() functions, to alter test state.

**zt\_t** is is a typedef that cuts the test case boilerplate size.

Internally **zt\_test** stores the outcome of the test as well as data required for non-local exit, necessary when **zt\_assert**() fails.

## HISTORY

**zt\_test** first appeared in libzt 0.1, **zt\_t** first appeared in libzt 0.2.

## AUTHORS

Zygmunt Krynicki ⟨*me@zygoon.pl*⟩
