An open API service indexing awesome lists of open source software.

https://github.com/spectrevert/rite

simple header for testing c/c++ source code
https://github.com/spectrevert/rite

c cpp tap unit-testing

Last synced: about 2 months ago
JSON representation

simple header for testing c/c++ source code

Awesome Lists containing this project

README

          

rite
----
simple header for testing c/c++ source code

Todo
----

<> document functions
<> add a demo.c file with examples

Abstract
--------
rite.h contains functions for writing tests programs that produce output
following the Test Anything Protocol. A test harness that knows this protocol
can run them and produce reports indicating their success or failure.

This header was inspired by Nik Clayton's libtap. Appart from the interface,
we have pretty much nothing in common with the latter. Our goal is to provide
a very simple, barebones implementation of a TAP producer. We have almost
no user input checking or error handling. Not using the code as you should
can result in undefined behavior.

Usage
-----
rite.h is a «stb-style» single-header library. This means that by default
it only exposes the functions delarations just like a normal header.

To create the implementation you *must* do this:

#define ZEE_RITE_IMPLEMENTATION
#include "rite.h"

in exactly *one* C or C++ file.

You can #define ZEE_ASSERT(x) before the #include to avoid using assert.h

Requirements
------------
<> a c99 compliant compiler

License
-------
The contents of this repository are licensed under the MIT License.