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_UNIT_TEST_FRAMEWORK_NO_LIB) && \ |
29 | !defined(BOOST_TEST_SOURCE) && !defined(BOOST_TEST_INCLUDED) && \ |
30 | defined(BOOST_TEST_MAIN) |
31 | # define BOOST_LIB_NAME boost_unit_test_framework |
32 | |
33 | # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TEST_DYN_LINK) |
34 | # define BOOST_DYN_LINK |
35 | # endif |
36 | |
37 | # include <boost/config/auto_link.hpp> |
38 | |
39 | #endif // auto-linking disabled |
40 | |
41 | // ************************************************************************** // |
42 | // ************** unit_test_main ************** // |
43 | // ************************************************************************** // |
44 | |
45 | namespace boost { namespace unit_test { |
46 | |
47 | int BOOST_TEST_DECL unit_test_main( init_unit_test_func init_func, int argc, char* argv[] ); |
48 | |
49 | } |
50 | |
51 | // !! ?? to remove |
52 | namespace unit_test_framework=unit_test; |
53 | |
54 | } |
55 | |
56 | #if defined(BOOST_TEST_DYN_LINK) && defined(BOOST_TEST_MAIN) && !defined(BOOST_TEST_NO_MAIN) |
57 | |
58 | // ************************************************************************** // |
59 | // ************** main function for tests using dll ************** // |
60 | // ************************************************************************** // |
61 | |
62 | int BOOST_TEST_CALL_DECL |
63 | main( int argc, char* argv[] ) |
64 | { |
65 | return ::boost::unit_test::unit_test_main( &init_unit_test, argc, argv ); |
66 | } |
67 | |
68 | //____________________________________________________________________________// |
69 | |
70 | #endif // BOOST_TEST_DYN_LINK && BOOST_TEST_MAIN && !BOOST_TEST_NO_MAIN |
71 | |
72 | #endif // BOOST_TEST_UNIT_TEST_HPP_071894GER |
73 | |