File indexing completed on 2025-01-30 10:01:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef BOOST_TEST_TEST_MAIN_IPP_012205GER
0014 #define BOOST_TEST_TEST_MAIN_IPP_012205GER
0015
0016
0017 #include <boost/test/framework.hpp>
0018 #include <boost/test/test_tools.hpp>
0019 #include <boost/test/unit_test_suite.hpp>
0020
0021
0022 #include <boost/cstdlib.hpp>
0023
0024 #include <boost/test/detail/suppress_warnings.hpp>
0025
0026
0027
0028 extern int test_main( int argc, char* argv[] );
0029
0030 struct test_main_caller {
0031 test_main_caller( int argc, char** argv ) : m_argc( argc ), m_argv( argv ) {}
0032
0033 void operator()() {
0034 int test_main_result = test_main( m_argc, m_argv );
0035
0036
0037 BOOST_CHECK( test_main_result == 0 || test_main_result == boost::exit_success );
0038 }
0039
0040 private:
0041
0042 int m_argc;
0043 char** m_argv;
0044 };
0045
0046
0047
0048
0049
0050 ::boost::unit_test::test_suite*
0051 init_unit_test_suite( int argc, char* argv[] ) {
0052 using namespace ::boost::unit_test;
0053
0054 framework::master_test_suite().p_name.value = "Test Program";
0055
0056 framework::master_test_suite().add( BOOST_TEST_CASE( test_main_caller( argc, argv ) ) );
0057
0058 return 0;
0059 }
0060
0061
0062
0063 #include <boost/test/detail/enable_warnings.hpp>
0064
0065 #endif