CppUTest
More info
- Type
- Test framework
- License
- BSD 3-Clause
- Source
- github.com/cpputest
A C++ unit testing framework for C and C++ code, designed with embedded targets and stingy compilers in mind.
CppUTest grew out of Michael Feathers' minimalist CppUnitLite and found its audience through James Grenning's 2011 book Test-Driven Development for Embedded C. The point is to test firmware logic on the development machine, no target board required, and rerun the same tests on hardware when it matters. To make that work the framework steers clear of most of the standard library and builds with older cross-compilers.
Two features set it apart from general-purpose frameworks. It replaces malloc and new and fails any test that leaks memory — surprisingly effective in code where the heap is tiny and fragmentation fatal. And it ships its own mocking layer, CppUMock, for swapping register access and drivers for expectations.