Welcome to the Erbsland UnitTest Documentation!
Erbsland Unit Test is a standalone unit testing framework tailored for testing libraries and applications with simplicity and efficiency in mind. Designed to boost developer productivity, it features minimal dependencies—requiring only C++, CMake, and Python—and is compatible with any compiler supporting c++20 or newer.
Minimal dependencies:
Requires only C++, CMake, and Python.
Broad compatibility:
Supports any compiler adhering to C++20 or newer.
Familiar with the framework? Dive into the specifics with chapters on:
Contents at a Glance
- Getting Started
- Structure and Naming
- The UnitTest Class
- CMake Integration
- Macros for Unittests
- Quick Overview
- The REQUIRE(expression) Macro
- The REQUIRE_FALSE(expression) Macro
- The REQUIRE_THROWS(expression) Macro
- The REQUIRE_THROWS_AS(exception class, expression) Macro
- The REQUIRE_NOTHROW(expression) Macro
- Macros for Value Comparison
- The
CHECK_...Macros - The WITH_CONTEXT(expression) Macro
- Add Tags with TAGS(...)
- Add Targets with TESTED_TARGETS(...)
- Skip Tests by Default with SKIP_BY_DEFAULT()
- Combine TAGS(...), TESTED_TARGETS(...) and SKIP_BY_DEFAULT()
- The Macro SOURCE_LOCATION()
- The Macro ERBSLAND_UNITTEST_MAIN()
- Command Line Options for the Unit Test Executable
- Advanced Usages
- GitHub Integration
- Bug Reports and Feature Requests
- Goals
- Requirements
- License
- Reference
- Classes
- Macros
REQUIREREQUIRE_FALSEREQUIRE_THROWSREQUIRE_THROWS_ASREQUIRE_NOTHROWREQUIRE_EQUALREQUIRE_NOT_EQUALREQUIRE_LESSREQUIRE_LESS_EQUALREQUIRE_GREATERREQUIRE_GREATER_EQUALCHECKCHECK_FALSECHECK_THROWSCHECK_THROWS_ASCHECK_NOTHROWCHECK_EQUALCHECK_NOT_EQUALCHECK_LESSCHECK_LESS_EQUALCHECK_GREATERCHECK_GREATER_EQUALWITH_CONTEXTTAGSTESTED_TARGETSSKIP_BY_DEFAULTSOURCE_LOCATIONUNITTEST_SUBCLASSERBSLAND_UNITTEST_MAIN
- Namespaces