Automated Mock & Stub Generation For C
CMock generates pure C code from regular C headers. No special markup is required! These generated files allow you to test a module thoroughly while being in full control of any connected modules.
Expectations
Use CMock to specify what functions your tests Expect to be called, and what arguments you expect them to be called with.
STUBS
Write custom test code which fully replaces neighboring interfaces during tests. You're in full control.
Ignores
If some function calls aren't important for this test, tell CMock to ignore calls to them, or just ignore the details.
Callbacks
Sometimes you want more control of the situation. No problem, tell CMock to call your own custom functions to do whatever needs to be done automatically.
Custom Types
CMock handles all built in types. WIth just a little help, it can handle any of your custom types as well.
Automatic
CMock automatically generates your mock modules from simple headers, saving you from tediously creating your own fakes.