Macros
See Macros for Unittests for a detailed description of the following macros.
-
REQUIRE(...)
-
REQUIRE_FALSE(...)
-
REQUIRE_THROWS(...)
-
REQUIRE_THROWS_AS(exceptionClass, ...)
-
REQUIRE_NOTHROW(...)
-
CHECK(...)
-
CHECK_FALSE(...)
-
CHECK_THROWS(...)
-
CHECK_THROWS_AS(exceptionClass, ...)
-
CHECK_NOTHROW(...)
-
WITH_CONTEXT(...)
-
TAGS(tags)
Define an empty TAGS() macro, to safely mark the class and method with tags.
-
TESTED_TARGETS(name_list)
Define an empty TESTED_TARGETS() macro, allow adding a list of tested classes or functions.
-
SKIP_BY_DEFAULT()
An empty macro to skip the test or class unless the tag is explicitly specified.
-
SOURCE_LOCATION()
-
UNITTEST_SUBCLASS(class_name)
Mark a class as subclass from
UnitTest
-
ERBSLAND_UNITTEST_MAIN()
Define the main method for the unit test executable.
Create a file
main.cpp
with this macro to define the main method for the unit test.