external_main_example_3.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // (C) Copyright Gennadiy Rozental 2001-2014.
  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. //
  7. // ***************************************************************************
  8. #define BOOST_TEST_NO_MAIN
  9. #define BOOST_TEST_ALTERNATIVE_INIT_API
  10. #include <boost/test/included/unit_test.hpp>
  11. using namespace boost::unit_test;
  12. //____________________________________________________________________________//
  13. BOOST_AUTO_TEST_SUITE( test_suite_1 )
  14. BOOST_AUTO_TEST_CASE( test_case_1 )
  15. {
  16. BOOST_TEST_MESSAGE( "Testing is in progress" );
  17. BOOST_TEST( false );
  18. }
  19. BOOST_AUTO_TEST_SUITE_END()
  20. //____________________________________________________________________________//
  21. bool
  22. init_function()
  23. {
  24. // do your own initialization here
  25. // if it successful return true
  26. // But, you CAN'T use testing tools here
  27. return true;
  28. }
  29. //____________________________________________________________________________//
  30. int
  31. main( int argc, char* argv[] )
  32. {
  33. return ::boost::unit_test::unit_test_main( &init_function, argc, argv );
  34. }
  35. //____________________________________________________________________________//