예제 #1
0
파일: newm.c 프로젝트: BenjiWiebe/newm
void on_login(char *name)
{
	if(config->login_message != NULL)
		in_message(name);
	if(config->login_command != NULL)
		run_command(config->login_command);
}
예제 #2
0
파일: tstDBC.cpp 프로젝트: sslattery/MCLS
//---------------------------------------------------------------------------//
// 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 );
    }
}