diff --git a/Assertion-Macros.md b/Assertion-Macros.md index a6af092..b707f50 100644 --- a/Assertion-Macros.md +++ b/Assertion-Macros.md @@ -1,4 +1,3 @@ - # Assertion Macros Most test frameworks have a large collection of assertion macros to capture all possible conditional forms (_EQUALS, _NOTEQUALS, _GREATER_THAN etc). @@ -15,13 +14,14 @@ The CHECK family are equivalent but execution continues in the same test case ev **REQUIRE(** _expression_ **)** and **CHECK(** _expression_ **)** Evaluates the expression and records the result. If an exception is thrown it is caught, reported, and counted as a failure. These are the macros you will use most of the time -

**REQUIRE_FALSE(** _expression_ **)** and **CHECK_FALSE(** _expression_ **)** Evaluates the expression and records the _logical NOT_ of the result. If an exception is thrown it is caught, reported, and counted as a failure. (these forms exist as a workaround for the fact that ! prefixed expressions cannot be decomposed). +## Exceptions + **REQUIRE_THROWS(** _expression_ **)** and **CHECK_THROWS(** _expression_ **)** Expects that an exception (of any type) is be thrown during evaluation of the expression.