diff options
Diffstat (limited to 'modules/core')
-rw-r--r-- | modules/core/c++/test/suite.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/core/c++/test/suite.hpp b/modules/core/c++/test/suite.hpp index 38a4716..88d741a 100644 --- a/modules/core/c++/test/suite.hpp +++ b/modules/core/c++/test/suite.hpp @@ -4,6 +4,7 @@ #include <memory> #include <stdexcept> #include <type_traits> +#include <sstream> #include "../common.hpp" @@ -41,3 +42,11 @@ public: auto msg = msg_split; \ throw std::runtime_error{std::string{msg}};\ } + +#define SAW_EOV_EXPECT(eov_expr, msg_split) \ + if( (eov_expr.is_error()) ){ \ + auto& err = eov_expr.get_error(); \ + std::stringstream sstr; \ + sstr<<msg_split<<" [Category] "<<err.get_category()<<" [Message] "<<err.get_message(); \ + throw std::runtime_error{sstr.str()}; \ + } |