custom_main.run-fail.cpp 769 B

12345678910111213141516171819202122232425262728293031
  1. // (C) Copyright Andrzej Krzemienski 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. #define BOOST_TEST_MODULE custom_main
  8. #define BOOST_TEST_NO_MAIN
  9. #define BOOST_TEST_ALTERNATIVE_INIT_API
  10. #include <boost/test/included/unit_test.hpp>
  11. #include <iostream>
  12. namespace utf = boost::unit_test;
  13. BOOST_AUTO_TEST_CASE(test1)
  14. {
  15. BOOST_TEST(false);
  16. }
  17. void make_use_of(char**)
  18. {
  19. std::cout << "Using custom entry point..." << std::endl;
  20. }
  21. int main(int argc, char* argv[], char* envp[])
  22. {
  23. make_use_of(envp);
  24. return utf::unit_test_main(init_unit_test, argc, argv);
  25. }
  26. //]