blob: 4538dde5106a8dcce5c548a54e7f129a8a44dc57 [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
Václav Kubernát90de9502019-11-20 17:19:44 +01005namespace trompeloeil {
6template <>
7void reporter<specialized>::send(
Jan Kundráta33cf082019-03-28 11:55:57 +01008 severity s,
9 const char* file,
10 unsigned long line,
11 const char* msg)
Václav Kubernát90de9502019-11-20 17:19:44 +010012{
Jan Kundráta33cf082019-03-28 11:55:57 +010013 auto f = line ? file : "[file/line unavailable]";
Václav Kubernát90de9502019-11-20 17:19:44 +010014 if (s == severity::fatal) {
15 ADD_FAIL_AT(f, line, msg);
16 } else {
17 ADD_FAIL_CHECK_AT(f, line, msg);
Jan Kundráta33cf082019-03-28 11:55:57 +010018 }
Václav Kubernát90de9502019-11-20 17:19:44 +010019}
Jan Kundráta33cf082019-03-28 11:55:57 +010020}