void on_login(char *name) { if(config->login_message != NULL) in_message(name); if(config->login_command != NULL) run_command(config->login_command); }
//---------------------------------------------------------------------------// // Test the insist macro for DBC. TEUCHOS_UNIT_TEST( Assertion, _test ) { try { std::string in_message( "test message content" ); MCLS_INSIST( 0, in_message ); throw std::runtime_error( "this shouldn't be thrown" ); } catch( const MCLS::Assertion& assertion ) { TEST_ASSERT( 1 ); std::string message( assertion.what() ); std::string true_message( "test message content" ); std::string::size_type idx = message.find( true_message ); if ( idx == std::string::npos ) { TEST_ASSERT( 0 ); } } catch( ... ) { TEST_ASSERT( 0 ); } }