test_cases.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <!--
  5. == Copyright 2002 The Trustees of Indiana University.
  6. == Use, modification and distribution is subject to the Boost Software
  7. == License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. == http://www.boost.org/LICENSE_1_0.txt)
  9. == Boost.MultiArray Library
  10. == Authors: Ronald Garcia
  11. == Jeremy Siek
  12. == Andrew Lumsdaine
  13. == See http://www.boost.org/libs/multi_array for documentation.
  14. -->
  15. <head>
  16. <title>
  17. Boost.MultiArray: Test Descriptions
  18. </title>
  19. </head>
  20. <body bgcolor="#ffffff" text="#000000">
  21. <IMG SRC="../../../boost.png"
  22. ALT="C++ Boost" width="277" height="86">
  23. <h1>Boost.MultiArray: Test Descriptions</h1>
  24. The following is a description of the test cases that are included with
  25. Boost.Multi_Array (B.M).
  26. <h2>Terminology</h2>
  27. The following list is to clarify the use of terms in the following
  28. descriptions:
  29. <ul>
  30. <li> <b>B.M</b> - abbreviation for Boost.MultiArray.
  31. <li><b>primary components</b> - refers to <tt>boost::multi_array</tt>,
  32. <tt>boost::const_multi_array_ref</tt>, and
  33. <tt>boost::multi_array_ref</tt>.
  34. <li><b>array types</b> - refers to all the primary components, plus for each
  35. primary component "array", the types <tt>array::const_subarray</tt>,
  36. <tt>array::subarray</tt>, <tt>array::const_array_view</tt>, and
  37. <tt>array::array_view </tt>
  38. </ul>
  39. <h2>Acceptance Tests</h2>
  40. The following tests exercise various features of Boost.Multi_Array to
  41. ensure proper operation at run time.
  42. <table border="1" cellspacing="0" cellpadding="5"
  43. summary="This table describes the test cases in the multi-array test
  44. suite that should compile and run.">
  45. <tr>
  46. <td>Program</td>
  47. <td>Description</td>
  48. </tr>
  49. <tr>
  50. <td><a href="../test/constructors.cpp">libs/multi_array/test/constructors.cpp</a></td>
  51. <td>
  52. Exercises all of the constructors for B.M primary components.
  53. </td>
  54. </tr>
  55. <tr>
  56. <td><a href="../test/access.cpp">libs/multi_array/test/access.cpp</a></td>
  57. <td>
  58. Tests <tt>operator[]</tt> and <tt>operator()</tt> on all B.M array types.
  59. </td>
  60. </tr>
  61. <tr>
  62. <td><a href="../test/compare.cpp">libs/multi_array/test/compare.cpp</a></td>
  63. <td>
  64. Tests all comparison operators for the B.M primary components.
  65. </td>
  66. </tr>
  67. <tr>
  68. <td><a href="../test/iterators.cpp">libs/multi_array/test/iterators.cpp</a></td>
  69. <td>
  70. Test all iterator traversal and access functionality for all B.M array types.
  71. </td>
  72. </tr>
  73. <tr>
  74. <td><a href="../test/slice.cpp">libs/multi_array/test/slice.cpp</a></td>
  75. <td>
  76. Test all variations of subview generation for all B.M array types.
  77. </td>
  78. </tr>
  79. <tr>
  80. <td><a href="../test/assign.cpp">libs/multi_array/test/assign.cpp</a></td>
  81. <td>
  82. Tests out <tt>operator=()</tt> on the various B.M array types.
  83. </td>
  84. </tr>
  85. <tr>
  86. <td><a href="../test/assign_to_array.cpp">libs/multi_array/test/assign_to_array.cpp</a></td>
  87. <td>
  88. Ensure that a <tt>multi_array</tt> can be constructed from any other
  89. array type.
  90. </td>
  91. </tr>
  92. <tr>
  93. <td><a href="../test/index_bases.cpp">libs/multi_array/test/index_bases.cpp</a></td>
  94. <td>
  95. Test re-indexing functionality for the B.M primary components.
  96. </td>
  97. </tr>
  98. <tr>
  99. <td><a href="../test/storage_order_convert.cpp">libs/multi_array/test/storage_order_convert.cpp</a></td>
  100. <td>
  101. Test out conversions among the storage orders data types.
  102. </td>
  103. </tr>
  104. <tr>
  105. <td><a href="../test/storage_order.cpp">libs/multi_array/test/storage_order.cpp</a></td>
  106. <td>
  107. Test variations on storage_order for the B.M primary components.
  108. </td>
  109. </tr>
  110. <tr>
  111. <td><a href="../test/reshape.cpp">libs/multi_array/test/reshape.cpp</a></td>
  112. <td>
  113. Test re-shaping functionality for the B.M primary components.
  114. </td>
  115. </tr>
  116. <tr>
  117. <td><a href="../test/range1.cpp">libs/multi_array/test/range1.cpp</a></td>
  118. <td>
  119. Test the various syntaxes for specifying index ranges using
  120. <tt>array::index_range</tt>.
  121. </td>
  122. </tr>
  123. <tr>
  124. <td><a href="../test/idxgen1.cpp">libs/multi_array/test/idxgen1.cpp</a></td>
  125. <td>
  126. Test the <tt>array::index_gen</tt> objects.
  127. </td>
  128. </tr>
  129. <tr>
  130. <td><a href="../test/stl_interaction.cpp">libs/multi_array/test/stl_interaction.cpp</a></td>
  131. <td>
  132. Test interaction between array types and STL containers.
  133. </td>
  134. </tr>
  135. <tr>
  136. <td><a href="../test/resize.cpp">libs/multi_array/test/resize.cpp</a></td>
  137. <td>
  138. Test the <tt>multi_array</tt> class' resizing functionality.
  139. </td>
  140. </tr>
  141. <tr>
  142. <td><a href="../test/concept_checks.cpp">libs/multi_array/test/concept_checks.cpp</a></td>
  143. <td>
  144. Ensure that all the array types meet the defined Concepts.
  145. </td>
  146. </tr>
  147. <tr>
  148. <td><a href="../test/assert.cpp">libs/multi_array/test/assert.cpp</a></td>
  149. <td>
  150. Ensure that uses of BOOST_ASSERT within the library can be customized
  151. by library users.
  152. </td>
  153. </tr>
  154. <tr>
  155. <td><a href="../test/allocators.cpp">libs/multi_array/test/allocators.cpp</a></td>
  156. <td>
  157. Test support for custom allocators.
  158. </td>
  159. </tr>
  160. <tr>
  161. <td><a href="../test/generative_tests.hpp">libs/multi_array/test/generative_tests.hpp</a></td>
  162. <td>
  163. A test harness used to simplify testing operations upon all array
  164. types. Used by slice.cpp, iterators.cpp, and access.cpp.
  165. </td>
  166. </tr>
  167. </table>
  168. <h2>Compile-Fail Tests</h2>
  169. The following tests check to make sure that various constructs not
  170. accepted by the library fail to compile. Each test checks only
  171. one fault in order to more easily ensure the cause of the
  172. compilation failure.
  173. <p>
  174. <table border="1" cellspacing="0" cellpadding="5"
  175. summary="This table describes the tests in the multi array test suite
  176. that should fail to compile">
  177. <tr>
  178. <td>Program</td>
  179. <td>Description</td>
  180. </tr>
  181. <tr>
  182. <td><a href="../test/fail_cbracket.cpp">libs/multi_array/test/fail_cbracket.cpp</a>
  183. <br><a href="../test/fail_ref_cbracket.cpp">libs/multi_array/test/fail_ref_cbracket.cpp</a></td>
  184. <td>
  185. <tt>operator[]</tt> on a const array must not modify elements.
  186. </td>
  187. </tr>
  188. <tr>
  189. <td><a href="../test/fail_cdata.cpp">libs/multi_array/test/fail_cdata.cpp</a>
  190. <br><a href="../test/fail_ref_cdata.cpp">libs/multi_array/test/fail_ref_cdata.cpp</a></td>
  191. <td>
  192. <tt>array::data() const</tt> must return a pointer to const data.
  193. </td>
  194. </tr>
  195. <tr>
  196. <td><a href="../test/fail_citerator.cpp">libs/multi_array/test/fail_citerator.cpp</a>
  197. <br><a href="../test/fail_ref_citerator.cpp">libs/multi_array/test/fail_ref_citerator.cpp</a></td>
  198. <td>
  199. <tt>const_iterator</tt> must not be convertible to <tt>iterator</tt>.
  200. </td>
  201. </tr>
  202. <tr>
  203. <td><a href="../test/fail_cparen.cpp">libs/multi_array/test/fail_cparen.cpp</a>
  204. <br><a href="../test/fail_ref_cparen.cpp">libs/multi_array/test/fail_ref_cparen.cpp</a></td>
  205. <td>
  206. <tt>operator()</tt> on a const array must not modify elements.
  207. </td>
  208. </tr>
  209. <tr>
  210. <td><a href="../test/fail_criterator.cpp">libs/multi_array/test/fail_criterator.cpp</a>
  211. <br><a href="../test/fail_ref_criterator.cpp">libs/multi_array/test/fail_ref_criterator.cpp</a></td>
  212. <td>
  213. <tt>const_reverse_iterator</tt> must not be convertible to
  214. <tt>reverse_iterator</tt>.
  215. </td>
  216. </tr>
  217. <tr>
  218. <td><a href="../test/fail_csubarray.cpp">libs/multi_array/test/fail_csubarray.cpp</a>
  219. <br><a href="../test/fail_ref_csubarray.cpp">libs/multi_array/test/fail_ref_csubarray.cpp</a></td>
  220. <td>
  221. <tt>const_subarray</tt> must not be convertible to <tt>subarray</tt>.
  222. </td>
  223. </tr>
  224. <tr>
  225. <td><a href="../test/fail_csubarray2.cpp">libs/multi_array/test/fail_csubarray2.cpp</a>
  226. <br><a href="../test/fail_ref_csubarray2.cpp">libs/multi_array/test/fail_ref_csubarray2.cpp</a></td>
  227. <td>
  228. <tt>array::operator[] const</tt> must not be convertible to <tt>subarray</tt>.
  229. </td>
  230. </tr>
  231. <tr>
  232. <td><a href="../test/fail_csubarray3.cpp">libs/multi_array/test/fail_csubarray3.cpp</a>
  233. <br><a href="../test/fail_ref_csubarray3.cpp">libs/multi_array/test/fail_ref_csubarray3.cpp</a></td>
  234. <td>
  235. <tt>const_subarray</tt> into an array must not modify elements.
  236. </td>
  237. </tr>
  238. <tr>
  239. <td><a href="../test/fail_cview.cpp">libs/multi_array/test/fail_cview.cpp</a>
  240. <br><a href="../test/fail_ref_cview.cpp">libs/multi_array/test/fail_ref_cview.cpp</a></td>
  241. <td>
  242. <tt>const_array_view</tt> of an array must not modify elements.
  243. </td>
  244. </tr>
  245. <tr>
  246. <td><a href="../test/fail_cview2.cpp">libs/multi_array/test/fail_cview2.cpp</a>
  247. <br><a href="../test/fail_ref_cview2.cpp">libs/multi_array/test/fail_ref_cview2.cpp</a></td>
  248. <td>
  249. <tt>array::operator[] const</tt> must not be convertible to
  250. <tt>array_view</tt>.
  251. </td>
  252. </tr>
  253. <tr>
  254. <td><a href="../test/fail_cview3.cpp">libs/multi_array/test/fail_cview3.cpp</a>
  255. <br><a href="../test/fail_ref_cview3.cpp">libs/multi_array/test/fail_ref_cview3.cpp</a></td>
  256. <td>
  257. <tt>const_array_view</tt> of an array must not modify elements.
  258. </td>
  259. </tr>
  260. </table>
  261. <br>
  262. <table summary="Copyright information">
  263. <tr valign="top">
  264. <td nowrap>Copyright &copy; 2001</td>
  265. <td><a href="http://www.boost.org/people/ronald_garcia.htm">Ronald Garcia</a>,
  266. Indiana University (<a href=
  267. "mailto:garcia@cs.indiana.edu">garcia@cs.indiana.edu</a>)<br>
  268. <a href="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>, Indiana
  269. University (<a href=
  270. "mailto:jsiek@cs.indiana.edu">jsiek@cs.indiana.edu</a>)<br>
  271. <a href="http://www.lsc.nd.edu/~lums">Andrew Lumsdaine</a>, Indiana
  272. University (<a href=
  273. "mailto:lums@cs.indiana.edu">lums@cs.indiana.edu</a>)</td>
  274. </tr>
  275. </table>
  276. <hr>
  277. <address>
  278. <a href="mailto:garcia@.cs.indiana.edu">Ronald Garcia</a>
  279. </address>
  280. <!-- hhmts start -->
  281. Last modified: Wed Oct 31 19:46:44 EST 2001
  282. <!-- hhmts end -->
  283. </body>
  284. </html>