summary_of_the_api_for_declaring.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Summary of the API for declaring and organizing tests</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="../tests_organization.html" title="Declaring and organizing tests">
  9. <link rel="prev" href="semantic.html" title="Adding semantic to a test">
  10. <link rel="next" href="../testing_tools.html" title="Writing unit tests">
  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="semantic.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tests_organization.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="../testing_tools.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h3 class="title">
  27. <a name="boost_test.tests_organization.summary_of_the_api_for_declaring"></a><a class="link" href="summary_of_the_api_for_declaring.html" title="Summary of the API for declaring and organizing tests">Summary
  28. of the API for declaring and organizing tests</a>
  29. </h3></div></div></div>
  30. <div class="informaltable"><table class="table">
  31. <colgroup>
  32. <col>
  33. <col>
  34. </colgroup>
  35. <thead><tr>
  36. <th>
  37. <p>
  38. Macro
  39. </p>
  40. </th>
  41. <th>
  42. <p>
  43. Short description
  44. </p>
  45. </th>
  46. </tr></thead>
  47. <tbody>
  48. <tr>
  49. <td>
  50. <p>
  51. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_case.html" title="BOOST_TEST_CASE and BOOST_TEST_CASE_NAME"><code class="computeroutput"><span class="identifier">BOOST_TEST_CASE</span></code></a>
  52. </p>
  53. </td>
  54. <td>
  55. <p>
  56. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_case.html" title="BOOST_TEST_CASE and BOOST_TEST_CASE_NAME"><code class="computeroutput"><span class="identifier">BOOST_TEST_CASE_NAME</span></code></a>
  57. </p>
  58. </td>
  59. <td>
  60. <p>
  61. Manual registration of a test case
  62. </p>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td>
  67. <p>
  68. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_auto_test_case.html" title="BOOST_AUTO_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_AUTO_TEST_CASE</span></code></a>
  69. </p>
  70. </td>
  71. <td>
  72. <p>
  73. Automatic declaration and registration of a test case
  74. </p>
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>
  79. <p>
  80. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_case_parameter.html" title="BOOST_PARAM_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_PARAM_TEST_CASE</span></code></a>
  81. </p>
  82. </td>
  83. <td>
  84. <p>
  85. Automatic declaration and registration of a test case with a collection
  86. of parameters
  87. </p>
  88. </td>
  89. </tr>
  90. <tr>
  91. <td>
  92. <p>
  93. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_case_auto_template.html" title="BOOST_AUTO_TEST_CASE_TEMPLATE"><code class="computeroutput"><span class="identifier">BOOST_AUTO_TEST_CASE_TEMPLATE</span></code></a>
  94. </p>
  95. </td>
  96. <td>
  97. <p>
  98. Automatic declaration and registration of a typed test case
  99. </p>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>
  104. <p>
  105. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_case_template.html" title="BOOST_TEST_CASE_TEMPLATE"><code class="computeroutput"><span class="identifier">BOOST_TEST_CASE_TEMPLATE</span></code></a>
  106. </p>
  107. </td>
  108. <td>
  109. <p>
  110. Registration of a typed test case with an <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span></code>
  111. like sequence of types
  112. </p>
  113. </td>
  114. </tr>
  115. <tr>
  116. <td>
  117. <p>
  118. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_case_template_function.html" title="BOOST_TEST_CASE_TEMPLATE_FUNCTION"><code class="computeroutput"><span class="identifier">BOOST_TEST_CASE_TEMPLATE_FUNCTION</span></code></a>
  119. </p>
  120. </td>
  121. <td>
  122. <p>
  123. Declaration of the body of a typed test case
  124. </p>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td>
  129. <p>
  130. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_dataset.html" title="BOOST_DATA_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_DATA_TEST_CASE</span></code></a>
  131. </p>
  132. </td>
  133. <td>
  134. <p>
  135. Declaration of the body of a test case on datasets
  136. </p>
  137. </td>
  138. </tr>
  139. <tr>
  140. <td>
  141. <p>
  142. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_dataset_fixture.html" title="BOOST_DATA_TEST_CASE_F"><code class="computeroutput"><span class="identifier">BOOST_DATA_TEST_CASE_F</span></code></a>
  143. </p>
  144. </td>
  145. <td>
  146. <p>
  147. Same as <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_dataset.html" title="BOOST_DATA_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_DATA_TEST_CASE</span></code></a> with
  148. fixtures support
  149. </p>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. <p>
  155. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_dataset.html" title="BOOST_DATA_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_TEST_DATASET_MAX_ARITY</span></code></a>
  156. </p>
  157. </td>
  158. <td>
  159. <p>
  160. Controlling the maximal arity of the data test case declared with
  161. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_dataset.html" title="BOOST_DATA_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_DATA_TEST_CASE</span></code></a>
  162. </p>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td>
  167. <p>
  168. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_suite.html" title="BOOST_TEST_SUITE"><code class="computeroutput"><span class="identifier">BOOST_TEST_SUITE</span></code></a>
  169. </p>
  170. </td>
  171. <td>
  172. <p>
  173. Manual creation of a test suite instance
  174. </p>
  175. </td>
  176. </tr>
  177. <tr>
  178. <td>
  179. <p>
  180. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_auto_test_suite.html" title="BOOST_AUTO_TEST_SUITE"><code class="computeroutput"><span class="identifier">BOOST_AUTO_TEST_SUITE</span></code></a>
  181. </p>
  182. </td>
  183. <td>
  184. <p>
  185. Automatic declaration of a test suite
  186. </p>
  187. </td>
  188. </tr>
  189. <tr>
  190. <td>
  191. <p>
  192. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_auto_test_suite_end.html" title="BOOST_AUTO_TEST_SUITE_END"><code class="computeroutput"><span class="identifier">BOOST_AUTO_TEST_SUITE_END</span></code></a>
  193. </p>
  194. </td>
  195. <td>
  196. <p>
  197. Automatic declaration of a test suite
  198. </p>
  199. </td>
  200. </tr>
  201. <tr>
  202. <td>
  203. <p>
  204. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_decorator.html" title="BOOST_TEST_DECORATOR"><code class="computeroutput"><span class="identifier">BOOST_TEST_DECORATOR</span></code></a>
  205. </p>
  206. </td>
  207. <td>
  208. <p>
  209. Adds decorators to a test unit
  210. </p>
  211. </td>
  212. </tr>
  213. <tr>
  214. <td>
  215. <p>
  216. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_case_fixture.html" title="BOOST_FIXTURE_TEST_CASE"><code class="computeroutput"><span class="identifier">BOOST_FIXTURE_TEST_CASE</span></code></a>
  217. </p>
  218. </td>
  219. <td>
  220. <p>
  221. Declares a test case with a fixture
  222. </p>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td>
  227. <p>
  228. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_suite_fixture.html" title="BOOST_FIXTURE_TEST_SUITE"><code class="computeroutput"><span class="identifier">BOOST_FIXTURE_TEST_SUITE</span></code></a>
  229. </p>
  230. </td>
  231. <td>
  232. <p>
  233. Declares a fixture for a test suite (the setup/teardown is called
  234. for each test of the test suite)
  235. </p>
  236. </td>
  237. </tr>
  238. <tr>
  239. <td>
  240. <p>
  241. <a class="link" href="../utf_reference/test_org_reference/test_org_boost_test_global_fixture.html" title="BOOST_TEST_GLOBAL_FIXTURE"><code class="computeroutput"><span class="identifier">BOOST_TEST_GLOBAL_FIXTURE</span></code></a>
  242. </p>
  243. </td>
  244. <td>
  245. <p>
  246. Declares a fixture globally to the test module
  247. </p>
  248. </td>
  249. </tr>
  250. </tbody>
  251. </table></div>
  252. <div class="informaltable"><table class="table">
  253. <colgroup>
  254. <col>
  255. <col>
  256. </colgroup>
  257. <thead><tr>
  258. <th>
  259. <p>
  260. Decorator
  261. </p>
  262. </th>
  263. <th>
  264. <p>
  265. Short description
  266. </p>
  267. </th>
  268. </tr></thead>
  269. <tbody>
  270. <tr>
  271. <td>
  272. <p>
  273. <a class="link" href="../utf_reference/test_org_reference/decorator_depends_on.html" title="depends_on (decorator)"><code class="computeroutput"><span class="identifier">depends_on</span></code></a>
  274. </p>
  275. </td>
  276. <td>
  277. <p>
  278. Creates a dependency (in the execution order and <a class="link" href="../runtime_config/test_unit_filtering.html#ref_default_run_status"><span class="emphasis"><em>default
  279. run status</em></span></a>) from one test case to another.
  280. </p>
  281. </td>
  282. </tr>
  283. <tr>
  284. <td>
  285. <p>
  286. <a class="link" href="../utf_reference/test_org_reference/decorator_description.html" title="description (decorator)"><code class="computeroutput"><span class="identifier">description</span></code></a>
  287. </p>
  288. </td>
  289. <td>
  290. <p>
  291. Attaches a semantic string to a test unit, that is visible from
  292. the command line interface.
  293. </p>
  294. </td>
  295. </tr>
  296. <tr>
  297. <td>
  298. <p>
  299. <a class="link" href="../utf_reference/test_org_reference/decorator_enabled.html" title="enabled / disabled (decorator)"><code class="computeroutput"><span class="identifier">enabled</span></code></a> , <a class="link" href="../utf_reference/test_org_reference/decorator_enabled.html" title="enabled / disabled (decorator)"><code class="computeroutput"><span class="identifier">disabled</span></code></a>
  300. </p>
  301. </td>
  302. <td>
  303. <p>
  304. Enables or disables unconditionally a test unit. The action of
  305. these decorators may be overridden by the command line interface
  306. </p>
  307. </td>
  308. </tr>
  309. <tr>
  310. <td>
  311. <p>
  312. <a class="link" href="../utf_reference/test_org_reference/decorator_enable_if.html" title="enable_if (decorator)"><code class="computeroutput"><span class="identifier">enable_if</span></code></a>
  313. </p>
  314. </td>
  315. <td>
  316. <p>
  317. Enables conditionally a test unit. The action of these decorators
  318. may be overridden by the command line interface
  319. </p>
  320. </td>
  321. </tr>
  322. <tr>
  323. <td>
  324. <p>
  325. <a class="link" href="../utf_reference/test_org_reference/decorator_fixture.html" title="fixture (decorator)"><code class="computeroutput"><span class="identifier">fixture</span></code></a>
  326. </p>
  327. </td>
  328. <td>
  329. <p>
  330. Attaches a fixture to a test unit
  331. </p>
  332. </td>
  333. </tr>
  334. <tr>
  335. <td>
  336. <p>
  337. <a class="link" href="../utf_reference/test_org_reference/decorator_label.html" title="label (decorator)"><code class="computeroutput"><span class="identifier">label</span></code></a>
  338. </p>
  339. </td>
  340. <td>
  341. <p>
  342. Labels a test unit to form a logical group
  343. </p>
  344. </td>
  345. </tr>
  346. <tr>
  347. <td>
  348. <p>
  349. <a class="link" href="../utf_reference/test_org_reference/decorator_precondition.html" title="precondition (decorator)"><code class="computeroutput"><span class="identifier">precondition</span></code></a>
  350. </p>
  351. </td>
  352. <td>
  353. <p>
  354. Enables or disables a test unit based on a predicate evaluated
  355. just before the execution of the test case.
  356. </p>
  357. </td>
  358. </tr>
  359. </tbody>
  360. </table></div>
  361. </div>
  362. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  363. <td align="left"></td>
  364. <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2019 Boost.Test
  365. contributors<p>
  366. Distributed under the Boost Software License, Version 1.0. (See accompanying
  367. 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>)
  368. </p>
  369. </div></td>
  370. </tr></table>
  371. <hr>
  372. <div class="spirit-nav">
  373. <a accesskey="p" href="semantic.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tests_organization.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="../testing_tools.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  374. </div>
  375. </body>
  376. </html>