blob: b333b7d9f06922ebb246d12873e5689ef11390d9 [file] [log] [blame]
Jan Kundráta33cf082019-03-28 11:55:57 +01001#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
2#include <doctest/doctest.h>
3#include <trompeloeil.hpp>
4
5namespace trompeloeil
6{
7 template <>
8 void reporter<specialized>::send(
9 severity s,
10 const char* file,
11 unsigned long line,
12 const char* msg)
13 {
14 auto f = line ? file : "[file/line unavailable]";
15 if (s == severity::fatal)
16 {
17 ADD_FAIL_AT(f, line, msg);
18 }
19 else
20 {
21 ADD_FAIL_CHECK_AT(f, line, msg);
22 }
23 }
24}