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

#include <tester.hpp>

Collaboration diagram for sysio::testing::sysio_assert_message_starts_with:

Public Member Functions

 sysio_assert_message_starts_with (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 starts with a given string

Definition at line 717 of file tester.hpp.

Constructor & Destructor Documentation

◆ sysio_assert_message_starts_with()

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

Definition at line 718 of file tester.hpp.

719 : expected( "assertion failure with message: " ) {
720 expected.append( msg );
721 }

Member Function Documentation

◆ operator()()

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

Definition at line 1255 of file tester.cpp.

1255 {
1256 auto message = ex.get_log().at( 0 ).get_message();
1257 bool match = boost::algorithm::starts_with( message, expected );
1258 if( !match ) {
1259 BOOST_TEST_MESSAGE( "LOG: expected: " << expected << ", actual: " << message );
1260 }
1261 return match;
1262 }

Member Data Documentation

◆ expected

string sysio::testing::sysio_assert_message_starts_with::expected

Definition at line 725 of file tester.hpp.


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