summary.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Summary of the API for writing 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="../testing_tools.html" title="Writing unit tests">
  9. <link rel="prev" href="debugging.html" title="Debugging the assertions">
  10. <link rel="next" href="../test_output.html" title="Controlling outputs">
  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="debugging.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../testing_tools.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="../test_output.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.testing_tools.summary"></a><a class="link" href="summary.html" title="Summary of the API for writing tests">Summary of the API
  28. for writing 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. Assertions
  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/testing_tool_ref/assertion_boost_test_universal_macro.html" title="BOOST_TEST"><code class="computeroutput"><span class="identifier">BOOST_TEST</span></code></a>, <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_test_universal_macro.html" title="BOOST_TEST"><code class="computeroutput"><span class="identifier">BOOST_TEST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span></code></a>
  52. </p>
  53. </td>
  54. <td>
  55. <p>
  56. General purpose assertion macro.
  57. </p>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td>
  62. <p>
  63. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level.html" title="BOOST_&lt;level&gt;"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span></code></a>
  64. </p>
  65. </td>
  66. <td>
  67. <p>
  68. Simple validation of a boolean predicate value.
  69. </p>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td>
  74. <p>
  75. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_bitwise_eq.html" title="BOOST_&lt;level&gt;_BITWISE_EQUAL"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_BITWISE_EQUAL</span></code></a>
  76. </p>
  77. </td>
  78. <td>
  79. <p>
  80. Bitwise equality test of two elements.
  81. </p>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>
  86. <p>
  87. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_eq.html" title="BOOST_&lt;level&gt;_EQUAL"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_EQUAL</span></code></a>
  88. </p>
  89. </td>
  90. <td>
  91. <p>
  92. Equality test of two elements.
  93. </p>
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>
  98. <p>
  99. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_eq_collections.html" title="BOOST_&lt;level&gt;_EQUAL_COLLECTIONS"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_EQUAL_COLLECTIONS</span></code></a>
  100. </p>
  101. </td>
  102. <td>
  103. <p>
  104. Element-wise equality test of two collections.
  105. </p>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>
  110. <p>
  111. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_close.html" title="BOOST_&lt;level&gt;_CLOSE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_CLOSE</span></code></a>
  112. </p>
  113. </td>
  114. <td>
  115. <p>
  116. Floating point comparison using a percentage of deviation.
  117. </p>
  118. </td>
  119. </tr>
  120. <tr>
  121. <td>
  122. <p>
  123. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_close_fraction.html" title="BOOST_&lt;level&gt;_CLOSE_FRACTION"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_CLOSE_FRACTION</span></code></a>
  124. </p>
  125. </td>
  126. <td>
  127. <p>
  128. Floating point comparison using the fraction of the compared operands.
  129. </p>
  130. </td>
  131. </tr>
  132. <tr>
  133. <td>
  134. <p>
  135. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_exception.html" title="BOOST_&lt;level&gt;_EXCEPTION"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_EXCEPTION</span></code></a>
  136. </p>
  137. </td>
  138. <td>
  139. <p>
  140. Exception detection and validation check.
  141. </p>
  142. </td>
  143. </tr>
  144. <tr>
  145. <td>
  146. <p>
  147. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_ge.html" title="BOOST_&lt;level&gt;_GE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_GE</span></code></a>
  148. </p>
  149. </td>
  150. <td>
  151. <p>
  152. Comparison of two values (with convenient reporting).
  153. </p>
  154. </td>
  155. </tr>
  156. <tr>
  157. <td>
  158. <p>
  159. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_gt.html" title="BOOST_&lt;level&gt;_GT"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_GT</span></code></a>
  160. </p>
  161. </td>
  162. <td>
  163. <p>
  164. Comparison of two values (with convenient reporting).
  165. </p>
  166. </td>
  167. </tr>
  168. <tr>
  169. <td>
  170. <p>
  171. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_le.html" title="BOOST_&lt;level&gt;_LE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_LE</span></code></a>
  172. </p>
  173. </td>
  174. <td>
  175. <p>
  176. Comparison of two values (with convenient reporting).
  177. </p>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td>
  182. <p>
  183. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_lt.html" title="BOOST_&lt;level&gt;_LT"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_LT</span></code></a>
  184. </p>
  185. </td>
  186. <td>
  187. <p>
  188. Comparison of two values (with convenient reporting).
  189. </p>
  190. </td>
  191. </tr>
  192. <tr>
  193. <td>
  194. <p>
  195. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_message.html" title="BOOST_&lt;level&gt;_MESSAGE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_MESSAGE</span></code></a>
  196. </p>
  197. </td>
  198. <td>
  199. <p>
  200. Same as <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level.html" title="BOOST_&lt;level&gt;"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span></code></a>
  201. with a custom message in case of failure.
  202. </p>
  203. </td>
  204. </tr>
  205. <tr>
  206. <td>
  207. <p>
  208. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_ne.html" title="BOOST_&lt;level&gt;_NE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_NE</span></code></a>
  209. </p>
  210. </td>
  211. <td>
  212. <p>
  213. Comparison of two values (with convenient reporting).
  214. </p>
  215. </td>
  216. </tr>
  217. <tr>
  218. <td>
  219. <p>
  220. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_no_throw.html" title="BOOST_&lt;level&gt;_NO_THROW"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_NO_THROW</span></code></a>
  221. </p>
  222. </td>
  223. <td>
  224. <p>
  225. Checks an expression does not throw any exception.
  226. </p>
  227. </td>
  228. </tr>
  229. <tr>
  230. <td>
  231. <p>
  232. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_predicate.html" title="BOOST_&lt;level&gt;_PREDICATE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_PREDICATE</span></code></a>
  233. </p>
  234. </td>
  235. <td>
  236. <p>
  237. Checks a list of arguments against a predicate functor.
  238. </p>
  239. </td>
  240. </tr>
  241. <tr>
  242. <td>
  243. <p>
  244. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_small.html" title="BOOST_&lt;level&gt;_SMALL"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_SMALL</span></code></a>
  245. </p>
  246. </td>
  247. <td>
  248. <p>
  249. Checks a value is small according to a tolerance.
  250. </p>
  251. </td>
  252. </tr>
  253. <tr>
  254. <td>
  255. <p>
  256. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_level_throw.html" title="BOOST_&lt;level&gt;_THROW"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_THROW</span></code></a>
  257. </p>
  258. </td>
  259. <td>
  260. <p>
  261. Checks an expression throws a specific type of expression.
  262. </p>
  263. </td>
  264. </tr>
  265. <tr>
  266. <td>
  267. <p>
  268. <a class="link" href="../utf_reference/testing_tool_ref/test_org_boost_test_case_expected_failure.html" title="BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES"><code class="computeroutput"><span class="identifier">BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES</span></code></a>
  269. </p>
  270. </td>
  271. <td>
  272. <p>
  273. Indicates the number of expected failures for a test case
  274. </p>
  275. </td>
  276. </tr>
  277. <tr>
  278. <td>
  279. <p>
  280. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_error.html" title="BOOST_ERROR"><code class="computeroutput"><span class="identifier">BOOST_ERROR</span></code></a>
  281. </p>
  282. </td>
  283. <td>
  284. <p>
  285. Logs an error message, fails but does not abort the current test.
  286. </p>
  287. </td>
  288. </tr>
  289. <tr>
  290. <td>
  291. <p>
  292. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_fail.html" title="BOOST_FAIL"><code class="computeroutput"><span class="identifier">BOOST_FAIL</span></code></a>
  293. </p>
  294. </td>
  295. <td>
  296. <p>
  297. Logs an error message, fails and aborts the current test.
  298. </p>
  299. </td>
  300. </tr>
  301. <tr>
  302. <td>
  303. <p>
  304. <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_is_defined.html" title="BOOST_IS_DEFINED"><code class="computeroutput"><span class="identifier">BOOST_IS_DEFINED</span></code></a>
  305. </p>
  306. </td>
  307. <td>
  308. <p>
  309. Checks at runtime whether or not the supplied preprocessor symbol
  310. is defined.
  311. </p>
  312. </td>
  313. </tr>
  314. </tbody>
  315. </table></div>
  316. <div class="informaltable"><table class="table">
  317. <colgroup>
  318. <col>
  319. <col>
  320. </colgroup>
  321. <thead><tr>
  322. <th>
  323. <p>
  324. Decorators
  325. </p>
  326. </th>
  327. <th>
  328. <p>
  329. Short description
  330. </p>
  331. </th>
  332. </tr></thead>
  333. <tbody>
  334. <tr>
  335. <td>
  336. <p>
  337. <a class="link" href="../utf_reference/testing_tool_ref/decorator_expected_failures.html" title="expected_failures (decorator)"><code class="computeroutput"><span class="identifier">expected_failures</span></code></a>
  338. </p>
  339. </td>
  340. <td>
  341. <p>
  342. Indicates the expected failures of a test unit.
  343. </p>
  344. </td>
  345. </tr>
  346. <tr>
  347. <td>
  348. <p>
  349. <a class="link" href="../utf_reference/testing_tool_ref/decorator_timeout.html" title="timeout (decorator)"><code class="computeroutput"><span class="identifier">timeout</span></code></a>
  350. </p>
  351. </td>
  352. <td>
  353. <p>
  354. Sets the maximum amount of time a test unit should take.
  355. </p>
  356. </td>
  357. </tr>
  358. <tr>
  359. <td>
  360. <p>
  361. <a class="link" href="../utf_reference/testing_tool_ref/decorator_tolerance.html" title="tolerance (decorator)"><code class="computeroutput"><span class="identifier">tolerance</span></code></a>
  362. </p>
  363. </td>
  364. <td>
  365. <p>
  366. Sets the floating point comparison tolerance for a test unit.
  367. </p>
  368. </td>
  369. </tr>
  370. </tbody>
  371. </table></div>
  372. <div class="informaltable"><table class="table">
  373. <colgroup>
  374. <col>
  375. <col>
  376. </colgroup>
  377. <thead><tr>
  378. <th>
  379. <p>
  380. Control macros
  381. </p>
  382. </th>
  383. <th>
  384. <p>
  385. Short description
  386. </p>
  387. </th>
  388. </tr></thead>
  389. <tbody>
  390. <tr>
  391. <td>
  392. <p>
  393. <a class="link" href="../utf_reference/testing_tool_ref/assertion_control_under_debugger.html" title="BOOST_TEST_TOOLS_UNDER_DEBUGGER"><code class="computeroutput"><span class="identifier">BOOST_TEST_TOOLS_UNDER_DEBUGGER</span></code></a>
  394. </p>
  395. </td>
  396. <td>
  397. <p>
  398. When defined, test assertions are compiled in debugger-friendly
  399. mode.
  400. </p>
  401. </td>
  402. </tr>
  403. <tr>
  404. <td>
  405. <p>
  406. <a class="link" href="../utf_reference/testing_tool_ref/assertion_control_under_debuggable.html" title="BOOST_TEST_TOOLS_DEBUGGABLE"><code class="computeroutput"><span class="identifier">BOOST_TEST_TOOLS_DEBUGGABLE</span></code></a>
  407. </p>
  408. </td>
  409. <td>
  410. <p>
  411. When defined, test assertions are compiled in two modes (debugger-friendly
  412. and full-featured), and the version is selected at run-time.
  413. </p>
  414. </td>
  415. </tr>
  416. </tbody>
  417. </table></div>
  418. </div>
  419. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  420. <td align="left"></td>
  421. <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2019 Boost.Test
  422. contributors<p>
  423. Distributed under the Boost Software License, Version 1.0. (See accompanying
  424. 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>)
  425. </p>
  426. </div></td>
  427. </tr></table>
  428. <hr>
  429. <div class="spirit-nav">
  430. <a accesskey="p" href="debugging.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../testing_tools.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="../test_output.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  431. </div>
  432. </body>
  433. </html>