• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>BOOST_TEST_MAIN</title>
5<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../index.html" title="Boost.Test">
8<link rel="up" href="../link_references.html" title="Build scenarios and behaviors">
9<link rel="prev" href="../link_references.html" title="Build scenarios and behaviors">
10<link rel="next" href="link_boost_test_module_macro.html" title="BOOST_TEST_MODULE">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../link_references.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../link_references.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="link_boost_test_module_macro.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_test.utf_reference.link_references.link_boost_test_main_macro"></a><a class="link" href="link_boost_test_main_macro.html" title="BOOST_TEST_MAIN"><code class="computeroutput"><span class="identifier">BOOST_TEST_MAIN</span></code></a>
28</h4></div></div></div>
29<p>
30          When defined, this macro creates a stub for the test module initialization
31          (the main entry part). This macro also expands properly into a <code class="computeroutput"><span class="identifier">main</span></code> function in case the shared library
32          variant of the <span class="emphasis"><em>Unit Test Framework</em></span> is used.
33        </p>
34<div class="caution"><table border="0" summary="Caution">
35<tr>
36<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../../doc/src/images/caution.png"></td>
37<th align="left">Caution</th>
38</tr>
39<tr><td align="left" valign="top">
40<p>
41            This macro should
42          </p>
43<div class="orderedlist"><ol class="orderedlist" type="1">
44<li class="listitem">
45                be defined before any inclusion directive to <span class="emphasis"><em>Unit Test
46                Framework</em></span> headers
47              </li>
48<li class="listitem">
49                be defined exactly for one compilation unit of your test module
50              </li>
51</ol></div>
52</td></tr>
53</table></div>
54<div class="tip"><table border="0" summary="Tip">
55<tr>
56<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../../../doc/src/images/tip.png"></td>
57<th align="left">Tip</th>
58</tr>
59<tr><td align="left" valign="top"><p>
60            The macro <a class="link" href="link_boost_test_module_macro.html" title="BOOST_TEST_MODULE"><code class="computeroutput"><span class="identifier">BOOST_TEST_MODULE</span></code></a> should be
61            preferred
62          </p></td></tr>
63</table></div>
64</div>
65<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
66<td align="left"></td>
67<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
68        Distributed under the Boost Software License, Version 1.0. (See accompanying
69        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
70      </p>
71</div></td>
72</tr></table>
73<hr>
74<div class="spirit-nav">
75<a accesskey="p" href="../link_references.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../link_references.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="link_boost_test_module_macro.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
76</div>
77</body>
78</html>
79