example11.run.cpp 973 B

1234567891011121314151617181920212223242526272829303132
  1. // (C) Copyright Gennadiy Rozental 2011-2015.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/test for the library home page.
  6. //[example_code
  7. #include <boost/test/included/unit_test.hpp>
  8. using namespace boost::unit_test;
  9. void test_case1() { /* ... */ }
  10. void test_case2() { /* ... */ }
  11. void test_case3() { /* ... */ }
  12. void test_case4() { /* ... */ }
  13. test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] )
  14. {
  15. test_suite* ts1 = BOOST_TEST_SUITE( "test_suite1" );
  16. ts1->add( BOOST_TEST_CASE( &test_case1 ) );
  17. ts1->add( BOOST_TEST_CASE( &test_case2 ) );
  18. test_suite* ts2 = BOOST_TEST_SUITE( "test_suite2" );
  19. ts2->add( BOOST_TEST_CASE( &test_case3 ) );
  20. ts2->add( BOOST_TEST_CASE( &test_case4 ) );
  21. framework::master_test_suite().add( ts1 );
  22. framework::master_test_suite().add( ts2 );
  23. return 0;
  24. }
  25. //]