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

source code of boost/boost/test/unit_test.hpp