example50.run-fail.cpp 736 B

12345678910111213141516171819202122232425262728
  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. #define BOOST_TEST_MODULE example
  8. #include <boost/test/included/unit_test.hpp>
  9. #include <fstream>
  10. struct MyConfig {
  11. MyConfig() : test_log( "example.log" ) {
  12. boost::unit_test::unit_test_log.set_stream( test_log );
  13. }
  14. ~MyConfig() {
  15. boost::unit_test::unit_test_log.set_stream( std::cout );
  16. }
  17. std::ofstream test_log;
  18. };
  19. BOOST_TEST_GLOBAL_CONFIGURATION( MyConfig );
  20. BOOST_AUTO_TEST_CASE( test_case ) {
  21. BOOST_TEST( false );
  22. }
  23. //]