Macros
TestingFramework.hpp File Reference

Code to wrap or improve the Catch testing framework used for unit tests. More...

#include <catch.hpp>
#include <csignal>
#include <cstddef>
#include <iomanip>
#include <limits>
#include <sstream>
#include <stdexcept>
#include <string>
#include "ErrorHandling/Error.hpp"
#include "Parallel/Abort.hpp"
#include "Parallel/Exit.hpp"
#include "Utilities/Requires.hpp"
#include "Utilities/TypeTraits.hpp"

Go to the source code of this file.

Macros

#define CAPTURE_PRECISE(variable)
 Alternative to Catch's CAPTURE that prints more digits. More...
 
#define SPECTRE_PARALLEL_REQUIRE(expr)
 A similar to Catch's REQUIRE statement, but can be used in tests that spawn several chares with possibly complex interaction between the chares. More...
 
#define SPECTRE_PARALLEL_REQUIRE_FALSE(expr)
 A similar to Catch's REQUIRE_FALSE statement, but can be used in tests that spawn several chares with possibly complex interaction between the chares. More...
 
#define CHECK_ITERABLE_APPROX(a, b)
 A wrapper around Catch's CHECK macro that checks approximate equality of entries in iterable containers. For maplike containers, keys are checked for strict equality and values are checked for approximate equality. More...
 
#define CHECK_ITERABLE_CUSTOM_APPROX(a, b, appx)
 Same as CHECK_ITERABLE_APPROX with user-defined Approx. The third argument should be of type Approx. More...
 
#define ERROR_TEST()
 Mark a test as checking a call to ERROR. More...
 
#define ASSERTION_TEST()
 Mark a test to be checking an ASSERT. More...
 

Detailed Description

Code to wrap or improve the Catch testing framework used for unit tests.