CppUTest: A C++ Unit Test Harness
Now that you’ve seen Unity, I’ll quickly describe CppUTest, my preferred unit test harness for C and C++. In full disclosure, I’m partial to CppUTest, not only because it is a capable test harness but also because I’m one of its authors. The first examples in this book use Unity. Later examples, starting in Chapter 8, Spying on the Production Code , use CppUTest.
CppUTest was developed to support multiple OS platforms with a specific goal of being usable for embedded development. The CppUTest macros make it so that test cases can be written without knowledge of C++. This makes it easy for C programmers to use the test harness.
CppUTest uses a primitive subset of C++; it’s a good choice for embedded ...
Get Test Driven Development for Embedded C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.