unit_test_example_09_1.cpp 997 B

12345678910111213141516171819202122232425262728293031323334
  1. // (C) Copyright Gennadiy Rozental 2005-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. // Boost.Test
  7. #define BOOST_TEST_MODULE Unit_test_example_09
  8. #include <boost/test/unit_test.hpp>
  9. // STL
  10. #include <iostream>
  11. //____________________________________________________________________________//
  12. struct MyConfig {
  13. MyConfig() { std::cout << "global setup part1\n"; }
  14. ~MyConfig() { std::cout << "global teardown part1\n"; }
  15. };
  16. // structure MyConfig is used as a global fixture - it's invoked pre and post any testing is performed
  17. BOOST_TEST_GLOBAL_FIXTURE( MyConfig );
  18. //____________________________________________________________________________//
  19. BOOST_AUTO_TEST_CASE( my_test1 )
  20. {
  21. BOOST_CHECK( true );
  22. }
  23. //____________________________________________________________________________//
  24. // EOF