From d35f8611812b8822face817484edf2bae08678b4 Mon Sep 17 00:00:00 2001 From: philsquared Date: Wed, 28 Mar 2012 11:18:18 -0700 Subject: [PATCH] Separated exceptions out --- Assertion-Macros.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.