2
0
mirror of https://github.com/boostorg/test.git synced 2026-02-18 02:22:09 +00:00

prerelease cleaning

[SVN r21023]
This commit is contained in:
Gennadiy Rozental
2003-12-01 00:42:38 +00:00
parent 10f7d1859d
commit 635bd81f44
58 changed files with 264 additions and 906 deletions

View File

@@ -20,55 +20,55 @@ using namespace boost::unit_test_framework;
struct my_exception1
{
explicit my_exception1( int res_code ) : m_res_code( res_code ) {}
explicit my_exception1( int res_code ) : m_res_code( res_code ) {}
int m_res_code;
int m_res_code;
};
struct my_exception2
{
explicit my_exception2( int res_code ) : m_res_code( res_code ) {}
explicit my_exception2( int res_code ) : m_res_code( res_code ) {}
int m_res_code;
int m_res_code;
};
//____________________________________________________________________________//
void throw_my_exception1()
{
throw my_exception1( 12 );
throw my_exception1( 12 );
}
void my_exception1_translator( my_exception1 )
{
BOOST_MESSAGE( "Caught my_exception1" );
BOOST_MESSAGE( "Caught my_exception1" );
}
//____________________________________________________________________________//
void throw_my_exception2()
{
throw my_exception1( 89 );
throw my_exception1( 89 );
}
void my_exception2_translator( my_exception2 )
{
BOOST_MESSAGE( "Caught my_exception2" );
BOOST_MESSAGE( "Caught my_exception2" );
}
//____________________________________________________________________________//
test_suite*
init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) {
test_suite* test = BOOST_TEST_SUITE("custom_exception_test");
test_suite* test = BOOST_TEST_SUITE("custom_exception_test");
register_exception_translator<my_exception1>( &my_exception1_translator );
register_exception_translator<my_exception2>( &my_exception2_translator );
register_exception_translator<my_exception1>( &my_exception1_translator );
register_exception_translator<my_exception2>( &my_exception2_translator );
test->add( BOOST_TEST_CASE( &throw_my_exception1 ) );
test->add( BOOST_TEST_CASE( &throw_my_exception2 ) );
test->add( BOOST_TEST_CASE( &throw_my_exception1 ) );
test->add( BOOST_TEST_CASE( &throw_my_exception2 ) );
return test;
return test;
}
//____________________________________________________________________________//
@@ -77,20 +77,8 @@ init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) {
// Revision History :
//
// $Log$
// Revision 1.2 2003/11/06 07:31:42 rogeeff
// Licence update
//
// Revision 1.1 2003/11/02 06:13:27 rogeeff
// 2 new tests added: multiple module auto unit testing and custom exception translator regitry unit test
//
// Revision 1.3 2003/10/27 07:13:32 rogeeff
// licence update
//
// Revision 1.2 2003/06/09 09:23:03 rogeeff
// 1.30.beta1
//
// Revision 1.1 2002/12/09 05:13:31 rogeeff
// Initial commit
// Revision 1.3 2003/12/01 00:42:37 rogeeff
// prerelease cleaning
//
// ***************************************************************************