example23.run-fail.cpp 651 B

1234567891011121314151617181920212223242526272829
  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. void foo( int value ) {
  10. BOOST_TEST_CHECKPOINT("Inside foo with value '" << value << "' (should not be there)");
  11. }
  12. BOOST_AUTO_TEST_CASE( test_case )
  13. {
  14. int* p = 0;
  15. BOOST_TEST_PASSPOINT();
  16. ++p;
  17. BOOST_TEST_PASSPOINT();
  18. ++p;
  19. BOOST_TEST_PASSPOINT();
  20. foo( *p );
  21. }
  22. //]