tap: protect against exceptions in func eval expect
This commit is contained in:
parent
f793175fdf
commit
ed7c466d8d
6
tap.ipp
6
tap.ipp
@ -47,7 +47,11 @@ template <typename... Args>
|
|||||||
void
|
void
|
||||||
util::TAP::logger::expect (const std::function<bool(Args...)> &test, Args&&... args, const std::string &msg)
|
util::TAP::logger::expect (const std::function<bool(Args...)> &test, Args&&... args, const std::string &msg)
|
||||||
{
|
{
|
||||||
expect (test (std::forward<Args> (args)...), msg);
|
try {
|
||||||
|
expect (test (std::forward<Args> (args)...), msg);
|
||||||
|
} catch (...) {
|
||||||
|
expect (false, msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user