Automated Mock & Stub Generation For C


CMock generates pure C code from regular C headers. No special markup required.


Use CMock to specify what functions your tests Expect to be called, and what arguments you expect them to be called with.


If some function calls aren't important for this test, tell CMock to ignore calls to them, or just ignore the details.


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.

Custom Types

CMock handles all built in types. WIth just a little help, it can handle any of your custom types as well.


CMock automatically generates your mock modules from simple headers, saving you from tediously creating your own stubs.