Test Better With Mimicc.

Mimicc is a clang-based C/C++ compiler and mocking framework that turns function and method declarations directly into runnable mocks.

A Few Ways Mimicc Makes Testing Easier:

Create mocks from headers

Even a small amount of hand-written mock code can be a source of ongoing debug and maintenance headache. By fully automating the mock generation step, you can focus entirely on writing production code and the test cases that validate it.

No external library dependencies

Use your favorite unit test framework, even if it’s your own. Run your test code on any architecture, with or without an OS.

Powerful mock control API

Some examples of things the API can do: record expected inputs and desired outputs, set user-defined comparison and return operations, define side effect hooks, and create instances of classes with private constructors.

Generalized function return via doxygen hints

If a function has a doxygen header which hints at the I/O direction of the parameters (e.g. @param[out]), mimicc will use this information to generate a mock which treats an output argument as a return. No need to write additional boilerplate code for handling mock I/O via function arguments.

Use the full range of C and C++ language specs

Whether you’re working on a c89-constrained safety critical device, or a desktop application full of rvalue references, move constructors, and default keywords; if your function declaration is linkable, it’s probably mockable.

Generate mocks from function pointer declarations

Writing code which uses an OS device driver interface of some kind? Most likely it uses a vtable-like structure like the Linux file_operations struct. Mimicc can automatically generate mocks for function pointers declared in a C struct as if they were C++ class methods.

Get The Tool

The current available version is 0.11.0-rc1
OSArchFile
Macx86_64mimicc-x86_64.dmg
Linuxx86_64mimicc-x86_64-Linux-dist-0.11.0-rc1.tar.gz
Windowsx86_64Not yet available. Contact us to let us know that this would be useful to you.

Supplementary Files

FileDescription
mimicc-smoke-test.tar.gzSmoke test set as described in the User Guide
UserGuide-Examples.tar.gzSource code for all examples presented in the User Guide

Get Help

Currently the best way to get support is via our contact page.

Give Feedback

We’d love to hear how you’re using the tools and how we can make them better! For general comments and feedback, use contact page or email us directly.