blob: c9c88877896e94d9c78c445c82758e1d02645d87 [file] [log] [blame]
Tomáš Pecka5123e002020-06-05 15:29:21 +02001#pragma once
2
3#include <doctest/doctest.h>
4#include <doctest/trompeloeil.hpp>
5#include <trompeloeil.hpp>
Tomáš Pecka5123e002020-06-05 15:29:21 +02006#define SECTION(name) DOCTEST_SUBCASE(name)
7
8using doctest::Approx;
9
10// https://github.com/onqtam/doctest/issues/216
11#undef REQUIRE_THROWS
12#undef REQUIRE_THROWS_AS
13#undef REQUIRE_THROWS_WITH
14#undef REQUIRE_NOTHROW
15#define REQUIRE_THROWS(expr) DOCTEST_REQUIRE_THROWS(static_cast<void>(expr))
16#define REQUIRE_THROWS_AS(expr, e) DOCTEST_REQUIRE_THROWS_AS(static_cast<void>(expr), e)
17#define REQUIRE_THROWS_WITH(expr, e) DOCTEST_REQUIRE_THROWS_WITH(static_cast<void>(expr), e)
18#define REQUIRE_NOTHROW(expr) DOCTEST_REQUIRE_NOTHROW(static_cast<void>(expr))
19
20extern template struct trompeloeil::reporter<trompeloeil::specialized>;