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 ToolThe current available version is 0.11.1-rc1
|Smoke test set as described in the User Guide
|Source code for all examples presented in the User Guide
Currently the best way to get support is via our contact page.