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 6 // See http://www.boost.org/libs/test for the library home page. 7 8 // Boost.Test 9 #define BOOST_TEST_MODULE Unit_test_example_09 10 #include <boost/test/unit_test.hpp> 11 12 // STL 13 #include <iostream> 14 15 //____________________________________________________________________________// 16 17 struct MyConfig { MyConfigMyConfig18 MyConfig() { std::cout << "global setup part1\n"; } ~MyConfigMyConfig19 ~MyConfig() { std::cout << "global teardown part1\n"; } 20 }; 21 22 // structure MyConfig is used as a global fixture - it's invoked pre and post any testing is performed 23 BOOST_TEST_GLOBAL_FIXTURE( MyConfig ); 24 25 //____________________________________________________________________________// 26 BOOST_AUTO_TEST_CASE(my_test1)27BOOST_AUTO_TEST_CASE( my_test1 ) 28 { 29 BOOST_CHECK( true ); 30 } 31 32 //____________________________________________________________________________// 33 34 // EOF 35