THC (Testing High C) is a set of macros and small functions aimed to help C developers write their tests
Python C
Pull request Compare This branch is 4 commits ahead, 31 commits behind hltbra:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
samples
.gitignore
README.md
suite_generator.py
test_thc.c
thc.c
thc.h

README.md

THC

THC (Testing High C) is a set of macros and small functions aimed to help C developers write their tests.

Usage

Create a test.c file:

#include "thc.h"

void ensure_not_high() {
    ENSURE(2 + 2 == 4);
}

int main() {
    thc_addtest(ensure_not_high);
    return thc_run(THC_VERBOSE);
}

Compile with:

$ gcc -o test.out test.c  -Ipath/to/thc/ path/to/thc/thc.c

See it run:

$ ./test.out
2 + 2 == 4 ... OK [ensure_not_high, test.c:4]

Run 1 test with 0 failures

I CAN HAZ COLORS:

usage