Migrate from Catch to Doctest
This reduces the build times of the test suite by about two thirds in my
testing in another project.
Change-Id: I8a5da3aff0956796c718d13237d0620f48316029
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/dependencies/+/1580
diff --git a/tests/doctest_integration.cpp b/tests/doctest_integration.cpp
new file mode 100644
index 0000000..b333b7d
--- /dev/null
+++ b/tests/doctest_integration.cpp
@@ -0,0 +1,24 @@
+#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
+#include <doctest/doctest.h>
+#include <trompeloeil.hpp>
+
+namespace trompeloeil
+{
+ template <>
+ void reporter<specialized>::send(
+ severity s,
+ const char* file,
+ unsigned long line,
+ const char* msg)
+ {
+ auto f = line ? file : "[file/line unavailable]";
+ if (s == severity::fatal)
+ {
+ ADD_FAIL_AT(f, line, msg);
+ }
+ else
+ {
+ ADD_FAIL_CHECK_AT(f, line, msg);
+ }
+ }
+}