Jan Kundrát | a33cf08 | 2019-03-28 11:55:57 +0100 | [diff] [blame] | 1 | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN |
| 2 | #include <doctest/doctest.h> |
| 3 | #include <trompeloeil.hpp> |
| 4 | |
Václav Kubernát | 90de950 | 2019-11-20 17:19:44 +0100 | [diff] [blame] | 5 | namespace trompeloeil { |
| 6 | template <> |
| 7 | void reporter<specialized>::send( |
Jan Kundrát | a33cf08 | 2019-03-28 11:55:57 +0100 | [diff] [blame] | 8 | severity s, |
| 9 | const char* file, |
| 10 | unsigned long line, |
| 11 | const char* msg) |
Václav Kubernát | 90de950 | 2019-11-20 17:19:44 +0100 | [diff] [blame] | 12 | { |
Jan Kundrát | a33cf08 | 2019-03-28 11:55:57 +0100 | [diff] [blame] | 13 | auto f = line ? file : "[file/line unavailable]"; |
Václav Kubernát | 90de950 | 2019-11-20 17:19:44 +0100 | [diff] [blame] | 14 | if (s == severity::fatal) { |
| 15 | ADD_FAIL_AT(f, line, msg); |
| 16 | } else { |
| 17 | ADD_FAIL_CHECK_AT(f, line, msg); |
Jan Kundrát | a33cf08 | 2019-03-28 11:55:57 +0100 | [diff] [blame] | 18 | } |
Václav Kubernát | 90de950 | 2019-11-20 17:19:44 +0100 | [diff] [blame] | 19 | } |
Jan Kundrát | a33cf08 | 2019-03-28 11:55:57 +0100 | [diff] [blame] | 20 | } |