Requirements for our unit test framework.
- A reusable license
- Small
- Very low Dependencies (includes are also important)
- Output results in TAP format
- Portable: Works on many systems with many compiler and runtime libraries
- Works on Linux
- Works on BSD and other Unix OS (probably macOS)
- Works on Windows
- STDC versions: C2y, C23, C17, C11, C99, C95 and C89
- C++ versions: C++23, C++20, C++17, C++14, C++11, C++03, C++98
- Catch signals
- Can execute every test in a separate process
- Can execute tests in the same process
- Github: Single file libs: unit-testing
- Github: awesome-c: testing
- Github: awesome-cpp: debug
- Github: awesome-tap
- Github: awesome-testing
- Github: Search for "unit"
- Github: Search for "test" (This search returns many unrelated results)
- Wikipedia: List on unit testing frameworks: C
- From the unity makers: comparsion of unit test frameworks
Name | PD MIT BSD | Other | Main .h | Main .c | x files | OS | Lang | SIG | Exec | Comments |
---|---|---|---|---|---|---|---|---|---|---|
- | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
AceUnit | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
acutest | MIT | - | 1994 / 65k | - | - | LWM | C,C++ | SIG | U,W | timer, TAP |
Atto | BSD-3 | - | 562 / 16k6 | 38 / 1k8 | - | L | C | - | - | cmake |
cfix | - | LGPL3 | 422/11k | - | - | W | C | SEH | ? | xUnit |
cgreen | ? | ISC | 18/512 | - | many | ? | ? | ? | ? | ? |
CHEAT | BSD-2 | ? | 3296 / 153k | ? | ? | LW | ? | ? | U,W | timeval |
cheatc | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
[check] | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
ciut | MIT | ? | 840 / 36k6 | ? | 219 / 5k5 | ? | ? | ? | ? | ? |
clar | - | ISC | 173 / 6k | 788 / 17k4 | ? | ? | ? | ? | ? | ? |
cmocka | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
[cpputest] | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
Criterion | MIT | ? | ? | ? | ? | ? | ? | ? | ? | ? |
ctest | - | Apache2 | 605 / 21k7 | ? | ? | ? | ? | ? | ? | ? |
CUnit | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
CuTest | ? | ZLIB | 4k | 8k | - | ? | ? | ? | ? | ? |
doctest | MIT | - | 7019 / 311k | 3971 / 160k | ? | ? | C++ | - | - | - |
ecunit | MIT | - | 144 / 4k | 95 / 2k7 | ? | ? | ? | ? | ? | ? |
embunit | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
fctx | BSD | - | 3947 / 104k | - | - | - | C / C++ | - | - | - |
greatest | - | ISC | 1266 / 67k3 | ? | ? | ? | ? | ? | ? | ? |
labrat | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
libok | - | - | 115 / 4k7 | ? | ? | ? | ? | ? | ? | ? |
libtap | - | LGPL3 | 115 / 4k7 | 362 / 8k4 | ? | ? | ? | ? | ? | ? |
libzt | - | LGPL | 234 / 6k6 | 1254 / 37k | ? | ? | ? | ? | ? | ? |
ltest | - | Apache2 | 205 / 7k4 | 134 / 3k4 | ? | ? | ? | ? | ? | ? |
metal_test | - | GPL2 | ? | ? | ? | ? | ? | ? | ? | ? |
minctest | ? | Zlib | 137 / 3k4 | ? | ? | ? | ? | ? | ? | |
mintest | - | Apache2 | 150 / 3k9 | ? | ? | ? | ? | ? | ? | ? |
MinUnit | MIT | ? | 391 / 11k4 | ? | ? | ? | ? | ? | ? | ? |
munit | MIT | ? | 535 / 17k2 | ? | ? | ? | ? | ? | ? | ? |
nala | MIT | ? | 449 / 16k4 | ? | ? | ? | ? | ? | ? | C11: _Generic, but nice features |
narwhal | MIT | ? | Many | ? | ? | ? | ? | ? | ? | ? |
picotest 1k4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
picotest 5k5 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
picotest 76k6 | BSD-3 | ? | 2029 / 76k6 | ? | ? | ? | ? | ? | ? | ? |
Rexo | PD | - | 9419 / 493k | ? | ? | ? | ? | ? | ? | ? |
seatest | MIT | - | 97 / 6k | 163 / 4k1 | ? | ? | ? | ? | ? | ? |
sigunit | MIT | - | 87 / 4k1 | ? | ? | ? | ? | ? | ? | ? |
slim_test | MIT | ? | 198 / 7k1 | ? | ? | ? | ? | ? | ? | ? |
SimplyC | - | GPL3 | 294 / 11k2 | 854 / 23k4 | ? | ? | ? | ? | ? | ? |
tau | ? | ? | ? | ? | ? | ? | ? | ? | ? | C11, but using auto register |
tela | MIT | - | 4k3 | 8k9 | many | ? | C/C++ | ? | ssh remote | |
testfw.h | PD or MIT | - | 581 / 22k3 | - | - | |||||
Testie | ? | ? | 47 / 3k | 468 / 15k5 | 192 / 7k2 | ? | ? | ? | ? | ? |
tst | ? | ? | 213 / 6k6 | ? | ? | ? | ? | ? | ? | ? |
tinytest | ? | ? | 14k8 | ? | ? | ? | ? | ? | ? | ? |
unit | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
unity | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
unityc | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
utest | PD | - | 564 / 16k2 | No | No | ? | ? | ? | ? | C99: var.args |
utest | - | GPL3 | 98 / 6k7 | 107 / 3k2 | ? | ? | ? | ? | ? | ? |
UTEST | ? | ? | 288 / 11k2 | 327 / 10k1 | 28 / 1k | ? | ? | ? | ? | ? |
utest.h | PD | - | 1431 / 64k7 | - | - | LMW | C/C++ | ? | ||
- | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
Name | PD MIT BSD | Other | Main .h | Main .c | x files | OS | Lang | SIG | Exec | Comments |