Changeset View
Changeset View
Standalone View
Standalone View
src/test/blockencodings_tests.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | static CBlock BuildBlockTestCase() { | ||||
} | } | ||||
return block; | return block; | ||||
} | } | ||||
// BOOST_CHECK_EXCEPTION predicates to check the exception message | // BOOST_CHECK_EXCEPTION predicates to check the exception message | ||||
class HasReason { | class HasReason { | ||||
public: | public: | ||||
HasReason(const std::string &reason) : m_reason(reason) {} | explicit HasReason(const std::string &reason) : m_reason(reason) {} | ||||
bool operator()(const std::exception &e) const { | bool operator()(const std::exception &e) const { | ||||
return std::string(e.what()).find(m_reason) != std::string::npos; | return std::string(e.what()).find(m_reason) != std::string::npos; | ||||
}; | }; | ||||
private: | private: | ||||
const std::string m_reason; | const std::string m_reason; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 411 Lines • Show Last 20 Lines |