lightweight_test_fail5.cpp 399 B

1234567891011121314151617181920212223242526
  1. //
  2. // Negative test for BOOST_TEST_THROWS
  3. //
  4. // Copyright (c) 2014 Peter Dimov
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt
  9. //
  10. #include <boost/detail/lightweight_test.hpp>
  11. struct X
  12. {
  13. };
  14. void f()
  15. {
  16. }
  17. int main()
  18. {
  19. BOOST_TEST_THROWS( f(), X );
  20. return boost::report_errors();
  21. }