# Boost.MultiArray: Test Descriptions

The following is a description of the test cases that are included with Boost.Multi_Array (B.M).

## Terminology

The following list is to clarify the use of terms in the following descriptions:

- B.M - abbreviation for Boost.MultiArray.
- primary components - refers to `boost::multi_array`, `boost::const_multi_array_ref`, and `boost::multi_array_ref`.
- array types - refers to all the primary components, plus for each primary component "array", the types `array::const_subarray`, `array::subarray`, `array::const_array_view`, and `array::array_view`

## Acceptance Tests

The following tests exercise various features of Boost.Multi_Array to ensure proper operation at run time.

Program | Description
libs/multi_array/test/constructors.cpp | Exercises all of the constructors for B.M primary components.
libs/multi_array/test/access.cpp | Tests `operator[]` and `operator()` on all B.M array types.
libs/multi_array/test/compare.cpp | Tests all comparison operators for the B.M primary components.
libs/multi_array/test/iterators.cpp | Test all iterator traversal and access functionality for all B.M array types.
libs/multi_array/test/slice.cpp | Test all variations of subview generation for all B.M array types.
libs/multi_array/test/assign.cpp | Tests out `operator=()` on the various B.M array types.
libs/multi_array/test/assign_to_array.cpp | Ensure that a `multi_array` can be constructed from any other array type.
libs/multi_array/test/index_bases.cpp | Test re-indexing functionality for the B.M primary components.
libs/multi_array/test/storage_order_convert.cpp | Test out conversions among the storage orders data types.
libs/multi_array/test/storage_order.cpp | Test variations on storage_order for the B.M primary components.
libs/multi_array/test/reshape.cpp | Test re-shaping functionality for the B.M primary components.
libs/multi_array/test/range1.cpp | Test the various syntaxes for specifying index ranges using `array::index_range`.
libs/multi_array/test/idxgen1.cpp | Test the `array::index_gen` objects.
libs/multi_array/test/stl_interaction.cpp | Test interaction between array types and STL containers.
libs/multi_array/test/resize.cpp | Test the `multi_array` class' resizing functionality.
libs/multi_array/test/concept_checks.cpp | Ensure that all the array types meet the defined Concepts.
libs/multi_array/test/assert.cpp | Ensure that uses of BOOST_ASSERT within the library can be customized by library users.
libs/multi_array/test/allocators.cpp | Test support for custom allocators.
libs/multi_array/test/generative_tests.hpp | A test harness used to simplify testing operations upon all array types. Used by slice.cpp, iterators.cpp, and access.cpp.

## Compile-Fail Tests

The following tests check to make sure that various constructs not accepted by the library fail to compile. Each test checks only one fault in order to more easily ensure the cause of the compilation failure.

Program | Description
libs/multi_array/test/fail_cbracket.cpp libs/multi_array/test/fail_ref_cbracket.cpp | `operator[]` on a const array must not modify elements.
libs/multi_array/test/fail_cdata.cpp libs/multi_array/test/fail_ref_cdata.cpp | `array::data() const` must return a pointer to const data.
libs/multi_array/test/fail_citerator.cpp libs/multi_array/test/fail_ref_citerator.cpp | `const_iterator` must not be convertible to `iterator`.
libs/multi_array/test/fail_cparen.cpp libs/multi_array/test/fail_ref_cparen.cpp | `operator()` on a const array must not modify elements.
libs/multi_array/test/fail_criterator.cpp libs/multi_array/test/fail_ref_criterator.cpp | `const_reverse_iterator` must not be convertible to `reverse_iterator`.
libs/multi_array/test/fail_csubarray.cpp libs/multi_array/test/fail_ref_csubarray.cpp | `const_subarray` must not be convertible to `subarray`.
libs/multi_array/test/fail_csubarray2.cpp libs/multi_array/test/fail_ref_csubarray2.cpp | `array::operator[] const` must not be convertible to `subarray`.
libs/multi_array/test/fail_csubarray3.cpp libs/multi_array/test/fail_ref_csubarray3.cpp | `const_subarray` into an array must not modify elements.
libs/multi_array/test/fail_cview.cpp libs/multi_array/test/fail_ref_cview.cpp | `const_array_view` of an array must not modify elements.
libs/multi_array/test/fail_cview2.cpp libs/multi_array/test/fail_ref_cview2.cpp | `array::operator[] const` must not be convertible to `array_view`.
libs/multi_array/test/fail_cview3.cpp libs/multi_array/test/fail_ref_cview3.cpp | `const_array_view` of an array must not modify elements.

Copyright © 2001 | Ronald Garcia, Indiana University (garcia@cs.indiana.edu) Jeremy Siek, Indiana University (jsiek@cs.indiana.edu) Andrew Lumsdaine, Indiana University (lums@cs.indiana.edu)

Last modified: Wed Oct 31 19:46:44 EST 2001