Lesson plan

CppUnit

CppUnit is a unit testing framework module for the C++ programming language. It allows unit-testing of C sources as well as C++ with minimal source modification. It was started around 2000 by Michael Feathers as a C++ port of JUnit for Windows and ported to Unix by Jerome Lacoste. The library is released under the GNU Lesser General Public License. However, unlike JUnit, CppUnit does not rely on annotations (as annotations were not added to C++ until C++26), and rather creates tests with preprocessor macros. The framework runs tests in suites. Test result output is sent to a filter, the most basic being a simple pass or fail count printed out, or more advanced filters allowing XML output compatible with continuous integration reporting systems. __NOTOC__The project has been forked several times. The freedesktop.org version at GitHub, maintained by Markus Mohrhard of the LibreOffice project (which uses CppUnit heavily), was actively maintained until 2020, and is used in Linux distributions such as Debian, Ubuntu, Gentoo and Arch. Some libraries, such as POCO C++ Libraries, provide their own APIs to consume the CppUnit library.

Back to article

Article summary

CppUnit is a unit testing framework module for the C++ programming language. It allows unit-testing of C sources as well as C++ with minimal source modification. It was started around 2000 by Michael Feathers as a C++ port of JUnit for Windows and ported to Unix by Jerome Lacoste. The library is released under the GNU Lesser General Public License. However, unlike JUnit, CppUnit does not rely on annotations (as annotations were not added to C++ until C++26), and rather creates tests with preprocessor macros. The framework runs tests in suites. Test result output is sent to a filter, the most basic being a simple pass or fail count printed out, or more advanced filters allowing XML output compatible with continuous integration reporting systems. __NOTOC__The project has been forked several times. The freedesktop.org version at GitHub, maintained by Markus Mohrhard of the LibreOffice project (which uses CppUnit heavily), was actively maintained until 2020, and is used in Linux distributions such as Debian, Ubuntu, Gentoo and Arch. Some libraries, such as POCO C++ Libraries, provide their own APIs to consume the CppUnit library.

Key claims

No claims recorded.

Discussion questions

  1. Summarise the article in your own words. Which single claim would you verify first, and why?
  2. Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
  3. If two sources disagreed about one of these facts, what would you need in order to trust one over the other?

Bibliography

No sources recorded.

Key claims and bibliography are generated from the same tracked claims and sources as the article page.