Ejemplo n.º 1
0
void on_login(char *name)
{
	if(config->login_message != NULL)
		in_message(name);
	if(config->login_command != NULL)
		run_command(config->login_command);
}
Ejemplo n.º 2
0
//---------------------------------------------------------------------------//
// 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 );
    }
}