Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::testing::sysio_assert_message_is Struct Reference

#include <tester.hpp>

Collaboration diagram for sysio::testing::sysio_assert_message_is:

Public Member Functions

 sysio_assert_message_is (const string &msg)
 
bool operator() (const sysio_assert_message_exception &ex)
 

Public Attributes

string expected
 

Detailed Description

Utility predicate to check whether an sysio_assert message is equivalent to a given string

Definition at line 703 of file tester.hpp.

Constructor & Destructor Documentation

◆ sysio_assert_message_is()

sysio::testing::sysio_assert_message_is::sysio_assert_message_is ( const string & msg)
inline

Definition at line 704 of file tester.hpp.

705 : expected( "assertion failure with message: " ) {
706 expected.append( msg );
707 }

Member Function Documentation

◆ operator()()

bool sysio::testing::sysio_assert_message_is::operator() ( const sysio_assert_message_exception & ex)

Definition at line 1246 of file tester.cpp.

1246 {
1247 auto message = ex.get_log().at( 0 ).get_message();
1248 bool match = (message == expected);
1249 if( !match ) {
1250 BOOST_TEST_MESSAGE( "LOG: expected: " << expected << ", actual: " << message );
1251 }
1252 return match;
1253 }

Member Data Documentation

◆ expected

string sysio::testing::sysio_assert_message_is::expected

Definition at line 711 of file tester.hpp.


The documentation for this struct was generated from the following files: