| 1 | // (C) Copyright Gennadiy Rozental 2001. |
| 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 | /// @file |
| 9 | /// @brief Entry point into the Unit Test Framework |
| 10 | /// |
| 11 | /// This header should be the only header necessary to include to start using the framework |
| 12 | // *************************************************************************** |
| 13 | |
| 14 | #ifndef BOOST_TEST_UNIT_TEST_HPP_071894GER |
| 15 | #define BOOST_TEST_UNIT_TEST_HPP_071894GER |
| 16 | |
| 17 | // Boost.Test |
| 18 | #include <boost/test/test_tools.hpp> |
| 19 | #include <boost/test/unit_test_suite.hpp> |
| 20 | |
| 21 | //____________________________________________________________________________// |
| 22 | |
| 23 | // ************************************************************************** // |
| 24 | // ************** Auto Linking ************** // |
| 25 | // ************************************************************************** // |
| 26 | |
| 27 | #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_TEST_NO_LIB) && \ |
| 28 | !defined(BOOST_TEST_SOURCE) && !defined(BOOST_TEST_INCLUDED) && \ |
| 29 | defined(BOOST_TEST_MAIN) |
| 30 | # define BOOST_LIB_NAME boost_unit_test_framework |
| 31 | |
| 32 | # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TEST_DYN_LINK) |
| 33 | # define BOOST_DYN_LINK |
| 34 | # endif |
| 35 | |
| 36 | # include <boost/config/auto_link.hpp> |
| 37 | |
| 38 | #endif // auto-linking disabled |
| 39 | |
| 40 | // ************************************************************************** // |
| 41 | // ************** unit_test_main ************** // |
| 42 | // ************************************************************************** // |
| 43 | |
| 44 | namespace boost { namespace unit_test { |
| 45 | |
| 46 | int BOOST_TEST_DECL unit_test_main( init_unit_test_func init_func, int argc, char* argv[] ); |
| 47 | |
| 48 | } |
| 49 | |
| 50 | // !! ?? to remove |
| 51 | namespace unit_test_framework=unit_test; |
| 52 | |
| 53 | } |
| 54 | |
| 55 | #if defined(BOOST_TEST_DYN_LINK) && defined(BOOST_TEST_MAIN) && !defined(BOOST_TEST_NO_MAIN) |
| 56 | |
| 57 | // ************************************************************************** // |
| 58 | // ************** main function for tests using dll ************** // |
| 59 | // ************************************************************************** // |
| 60 | |
| 61 | int BOOST_TEST_CALL_DECL |
| 62 | main( int argc, char* argv[] ) |
| 63 | { |
| 64 | return ::boost::unit_test::unit_test_main( &init_unit_test, argc, argv ); |
| 65 | } |
| 66 | |
| 67 | //____________________________________________________________________________// |
| 68 | |
| 69 | #endif // BOOST_TEST_DYN_LINK && BOOST_TEST_MAIN && !BOOST_TEST_NO_MAIN |
| 70 | |
| 71 | #endif // BOOST_TEST_UNIT_TEST_HPP_071894GER |
| 72 | |