Boost logo

Boost-Commit :

From: garcia_at_[hidden]
Date: 2007-11-20 10:56:29


Author: garcia
Date: 2007-11-20 10:56:29 EST (Tue, 20 Nov 2007)
New Revision: 41256
URL: http://svn.boost.org/trac/boost/changeset/41256

Log:
Added a simple test that changes index bases while resizing (thanks to
wasti.redl_at_[hidden] for this code, which caught a bug).

Text files modified:
   trunk/libs/multi_array/test/resize.cpp | 8 ++++++++
   1 files changed, 8 insertions(+), 0 deletions(-)

Modified: trunk/libs/multi_array/test/resize.cpp
==============================================================================
--- trunk/libs/multi_array/test/resize.cpp (original)
+++ trunk/libs/multi_array/test/resize.cpp 2007-11-20 10:56:29 EST (Tue, 20 Nov 2007)
@@ -114,6 +114,14 @@
     }
   }
 
+ // Resizing that changes index bases too (impl bug caused an assert)
+ {
+ typedef boost::multi_array<int, 1> ar_t;
+ typedef ar_t::extent_range range;
+ ar_t ar;
+ ar.resize(boost::extents[range(-3, 3)]);
+ }
+
 
   return boost::exit_success;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk