Welcome to the Erbsland Unittest Documentation!
Welcome to Erbsland UnitTest, a standalone unit testing system designed for testing libraries and applications. Our unit testing system is built with a focus on productivity and minimal dependencies. For more convenient usage, it requires only a minimal set of dependencies (C++, CMake, Python) and is compatible with any compiler that support C++17 or any newer version of the language.
Contents:
- Preface
- Quick Start
- Full Unit Test Example
- Command Line Examples
- Formatting in Code Examples
- Recommended Project Structure
- Create the Project Structure
- Configuring the Root Project CMake File
- Setting Up the Unit Test CMake File
- Writing the Tests
- Create the Build Environment and Compile the Test
- Run the Test
- What’s Next?
- 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
- 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
- Goals
- Namespaces
- Classes
- Macros