Single-file unit testing framework in C.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake
include/rexo
tests
.clang-format
.clang-tidy
.gitattributes
CMakeLists.txt
LICENSE
Makefile
README.md

README.md

Rexo

Rexo is a simple unit testing framework for C/C++.

It is written in C89 at the exception of a couple of features borrowed from C99.

Features

  • mostly C89-compliant
  • diagonal and orthogonal APIs
  • fixtures
  • simple

Minimal Example

#include <rexo/rexo.h>

RX_TEST_CASE(testBasics)
{
    RX_CHECK_INT_EQUAL(1, 1);
}

static const struct RxTestCase cases[]
    = {{"basics", testBasics}};

static const struct RxTestSuite suites[]
    = {{"example", sizeof cases / sizeof cases[0], cases, NULL, NULL}};

int
main(int argc, const char **ppArgv)
{
    rxRun(sizeof suites / sizeof suites[0], suites, argc, ppArgv);
    return 0;
}