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
- Host: GitHub
- URL: https://github.com/spectrevert/rite
- Owner: SpectreVert
- License: mit
- Created: 2021-04-01T06:56:35.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T15:14:08.000Z (over 3 years ago)
- Last Synced: 2026-05-01T02:34:08.822Z (about 2 months ago)
- Topics: c, cpp, tap, unit-testing
- Language: C
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
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.