Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 562 Bytes

readme.adoc

File metadata and controls

26 lines (20 loc) · 562 Bytes

Detest - A Simple C11 test framework

Features:

  • No dynamic allocations.

  • No standard library usage (except for vsnprintf).

  • Thread safe via _Atomic.

  • No macro magic, explicit and somewhat simple.

Example:

#include "detest.h"

int main(int ac, char *av[])
{
	struct demeta d = { 0 };

	detest("should fail given untrue expression", 1 == 2, &d, 0);
	detest("should succeed given a true expression", 1 == 1, &d, 0);
	detest("should not be printed", 1 == 1, &d, DE_QUIET);

	return dereport(&d);
}