View on GitHub

ANSI C based Unittest Framework

Download this project as a .zip file Download this project as a tar.gz file

ANSI C based Unit Test Framework

(C) 2014 Gerhard Gappmeier


GPLv2, see LICENSE file.


I developed this because there was no good ANSI C based unittest framework available which fulfills my requirements.

This unittest framework is designed portable and small so that it works also for embedded projects on micro controllers. In the minimum configuration it only requires one c file and one h file (testlib.h, testlib.c). You can simply compile this with your micro controller project.

On PC based platforms like Linux and Windows this offers even more functionality.



You can build the API documentation using "make doc". This requires doxygen to be installed.

You can also read the Online Reference Documentation


You find unit test examples in src/test.

A minimum example of writing a unit test is a simple as that:

#include <testlib.h>
void test_helloworld()
    UVERIFY2(true, "Hello World");
void register_tests()


The easiest way to get the unittest framework is using git.

git clone
cd unittest
git submodule init
git submodule update