Re: [AgileEmbedded] Re: Some new articles
- View SourceThanks for the shout out for CMock Matt! CMock currently only supports
mocks for C. I am currently doing C++ development work, and using
GoogleTest and GoogleMock. They are very popular, though actually take a
bit more effort to setup and create mocks. Though, being C++, a lot of
things become more complex.. ;)
I want to clarify that CMock supports stubs too, via the 'ignore' plugin.
In practice though, I rarely use stubs, since CMock mocks are very trivial
to generate and use. I prefer to be more explicit about defining module
interactions using mocks. Though there are cases, like simple data
accessors, where it is nice be explicit about not caring about call
ordering or even number of calls to a data accessor.
You are also correct that CMock can definitely be used outside of Ceedling
as well. Ceedling is a general build system, which also has bundles in
CMock, Unity and CException. It makes creating a testable project a breeze.
*Greg Williams | Embedded Craftsman*
Atomic Embedded | http://atomicembedded.com
[Ph] +1 616 264 3734 [Fx] +1 616 776 6015
[Non-text portions of this message have been removed]