blob: eb597f9b532ea419fa19fd0dd36da2c1a8a5c997 [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>
6
7#define SECTION(name) DOCTEST_SUBCASE(name)
8
9using doctest::Approx;
10
11// https://github.com/onqtam/doctest/issues/216
12#undef REQUIRE_THROWS
13#undef REQUIRE_THROWS_AS
14#undef REQUIRE_THROWS_WITH
15#undef REQUIRE_NOTHROW
16#define REQUIRE_THROWS(expr) DOCTEST_REQUIRE_THROWS(static_cast<void>(expr))
17#define REQUIRE_THROWS_AS(expr, e) DOCTEST_REQUIRE_THROWS_AS(static_cast<void>(expr), e)
18#define REQUIRE_THROWS_WITH(expr, e) DOCTEST_REQUIRE_THROWS_WITH(static_cast<void>(expr), e)
19#define REQUIRE_NOTHROW(expr) DOCTEST_REQUIRE_NOTHROW(static_cast<void>(expr))
20
21extern template struct trompeloeil::reporter<trompeloeil::specialized>;