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:
Not sure -- I think
```
CHECK(processor_after->getProperty("invokehttp-proxy-password") == "")
with expansion:
"null" == ""
```
reads better than
```
CHECK(processor_after->getProperty("invokehttp-proxy-password") == "")
with expansion:
expected("null") == ""
```
but the second option has its advantages, too. If you still like the second
option better after sleeping on it, I don't mind changing it.
--
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]