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
REQUIRE
REQUIRE_FALSE
REQUIRE_THROWS
REQUIRE_THROWS_AS
REQUIRE_NOTHROW
REQUIRE_EQUAL
REQUIRE_NOT_EQUAL
REQUIRE_LESS
REQUIRE_LESS_EQUAL
REQUIRE_GREATER
REQUIRE_GREATER_EQUAL
CHECK
CHECK_FALSE
CHECK_THROWS
CHECK_THROWS_AS
CHECK_NOTHROW
CHECK_EQUAL
CHECK_NOT_EQUAL
CHECK_LESS
CHECK_LESS_EQUAL
CHECK_GREATER
CHECK_GREATER_EQUAL
WITH_CONTEXT
TAGS
TESTED_TARGETS
SKIP_BY_DEFAULT
SOURCE_LOCATION
UNITTEST_SUBCLASS
ERBSLAND_UNITTEST_MAIN
- Namespaces