A unit testing framework for C

There are a variety of C unit testing frameworks available, but CMocka offers support for mock objects, different platforms and compilers.

Learn more »

Motivation

The idea of CMocka is that a test application only requires the standard C library and the CMocka library itself to minimize conflicts with standard C headers especially on a lot of different platforms.

Currently CMocka is tested on Linux, FreeBSD, Solaris and Windows. See the Testing Dashboard.

CMocka is a fork of Google's cmockery.

Features

  • An easy to use framework to write unit tests.
  • Support for mock objects!
  • Well documented library
  • Testing of memory leaks, buffer overflows and underflows.
  • Platform and compiler independent.
  • Apache License 2.0

Discussion

Bugs

Bugs can be reported to the CMocka Bugtracker.

Mailing List

To subscribe send a mail to:

You can find the mailinglist archive here.

IRC

#cmocka @ irc.freenode.net

Development

cmocka is developed using the git version control system. You can find the web interface of the git respository at:

http://git.cryptomilk.org/projects/cmocka.git/