ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
Macros
expect.hpp File Reference
#include <daq/error/report.hpp>

Go to the source code of this file.

Macros

#define EXPECT_THROW_WITH_MESSAGE(stmt, etype, matcher)
 Expect that stmt throws exception of type etype and that the exception message matches matcher.
 

Detailed Description

Definition in file expect.hpp.

Macro Definition Documentation

◆ EXPECT_THROW_WITH_MESSAGE

#define EXPECT_THROW_WITH_MESSAGE (   stmt,
  etype,
  matcher 
)
Value:
EXPECT_THROW( \
try { stmt; } catch (const etype& ex) { \
std::stringstream ss; \
daq::error::ReportNestedExceptions(ss, ex); \
EXPECT_THAT(ss.str(), matcher); \
throw; \
}, \
etype)

Expect that stmt throws exception of type etype and that the exception message matches matcher.

Definition at line 15 of file expect.hpp.