Maintenance of UnitTest++, recently sporadic, is officially on hiatus until 26 November 2020. Subscribe to unittest-cpp#180 for updates.
UnitTest++ is a lightweight unit testing framework for C++. It was designed to do test-driven development on a wide variety of platforms. Simplicity, portability, speed, and small footprint are all very important aspects of UnitTest++. UnitTest++ is mostly standard C++ and makes minimal use of advanced library and language features, which means it should be easily portable to just about any platform. Out of the box, the following platforms are supported:
- Windows
- Linux
- Mac OS X
- VxWorks 5.5
The full documentation for building and using UnitTest++ can be found on the GitHub wiki page. The contents of this wiki are also included as a git submodule under the docs
folder, so version-specific Markdown documentation is always available along with the download.
While there are currently some bundled automake files, UnitTest++ is primarily built and supported using CMake.
Via git:
git clone https://github.com/unittest-cpp/unittest-cpp
Via svn:
svn checkout https://github.com/unittest-cpp/unittest-cpp/trunk unittest-cpp
Via git:
git clone https://github.com/unittest-cpp/unittest-cpp
cd unittest-cpp
git checkout v2.0.0
Via svn:
svn checkout https://github.com/unittest-cpp/unittest-cpp/tags/v2.0.0 unittest-cpp
UnitTest++ is free software. You may copy, distribute, and modify it under the terms of the License contained in the file LICENSE distributed with this package. This license is the same as the MIT/X Consortium license.
- Patrick Johnmeyer ([email protected]) @pjohnmeyer
- Charles Nicholson ([email protected]) @charlesnicholson
- Noel Llopis ([email protected])
- Charles Nicholson ([email protected])
- Jim Tilander
- Kim Grasman
- Jonathan Jansson
- Dirck Blaskey
- Rory Driscoll
- Dan Lind
- Matt Kimmel -- Submitted with permission from Blue Fang Games
- Anthony Moralez
- Jeff Dixon
- Randy Coulman
- Lieven van der Heide
- Change Check method supporting CHECK macro to accept argument by reference
- Introduce long macro forms (e.g. UNITTEST_CHECK); make short forms optional
- Improved Visual Studio 2015 support
- Full List
- Add REQUIRE macro to end tests early when selected checks fail
- Full List
- pkg-config support
- Fix for Visual Studio 2010 compilation issue in 1.5.0
- Full List
- Visual Studio 2015 support
- CMake-based build management
- Integration of SourceForge and Google Code versions of the project
- Full List
- CHECK macros work at arbitrary stack depth from inside TESTs.
- Remove obsolete TEST_UTILITY macros
- Predicated test execution (via TestRunner::RunTestsIf)
- Better exception handling for fixture ctors/dtors.
- VC6/7/8/9 support
- Removed dynamic memory allocations (other than streams)
- MinGW support
- Consistent (native) line endings
- Minor bug fixing
- First pass at documentation.
- More detailed error crash catching in fixtures.
- Standard streams used for printing objects under check. This should allow the use of standard class types such as std::string or other custom classes with stream operators to ostream.
- Standard streams can be optionally compiled off by defining UNITTEST_USE_CUSTOM_STREAMS in Config.h
- Added named test suites
- Added CHECK_ARRAY2D_CLOSE
- Posix library name is libUnitTest++.a now
- Floating point numbers are postfixed with 'f' in the failure reports
- CHECK macros do not have side effects even if one of the parameters changes state
- Removed CHECK_ARRAY_EQUAL (too similar to CHECK_ARRAY_CLOSE)
- Added local and global time constraints
- Removed dependencies on strstream
- Improved Posix signal to exception translator
- Failing tests are added to Visual Studio's error list
- Fixed Visual Studio projects to work with spaces in directories
- Initial release