Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
C++ Boost

Boost.MultiArray: Test Descriptions

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


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

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/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
operator[] on a const array must not modify elements.
array::data() const must return a pointer to const data.
const_iterator must not be convertible to iterator.
operator() on a const array must not modify elements.
const_reverse_iterator must not be convertible to reverse_iterator.
const_subarray must not be convertible to subarray.
array::operator[] const must not be convertible to subarray.
const_subarray into an array must not modify elements.
const_array_view of an array must not modify elements.
array::operator[] const must not be convertible to array_view.
const_array_view of an array must not modify elements.

Copyright © 2001 Ronald Garcia, Indiana University (
Jeremy Siek, Indiana University (
Andrew Lumsdaine, Indiana University (

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