fgerlits commented on code in PR #2217:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2217#discussion_r3647223518
##########
libminifi/test/libtest/unit/Catch.h:
##########
@@ -56,6 +58,19 @@ struct StringMaker<std::chrono::file_clock::duration> {
return fmt::format("{} {} s", duration.count(),
Catch::ratio_string<std::chrono::file_clock::duration::period>::symbol());
}
};
+
+template <typename T, typename E>
+struct StringMaker<std::expected<T, E>> {
+ static std::string convert(const std::expected<T, E>& expected) {
+ if (!expected) {
+ return "error: " + Catch::Detail::stringify(expected.error());
+ }
+ if constexpr (!std::is_void_v<T>) {
+ return Catch::Detail::stringify(*expected);
+ }
+ return "OK";
Review Comment:
I have updated the debug strings to what you suggested, in
8eef269f100ab235defbfd2ea99bb3de06ab0a4b. I have kept the structure as it was,
because your version doesn't compile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]