|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84732 - trunk/libs/geometry/index/test/rtree/exceptions
From: adam.wulkiewicz_at_[hidden]
Date: 2013-06-10 16:36:21
Author: awulkiew
Date: 2013-06-10 16:36:21 EDT (Mon, 10 Jun 2013)
New Revision: 84732
URL: http://svn.boost.org/trac/boost/changeset/84732
Log:
geometry.index test: added packing to exceptions tests.
Text files modified:
trunk/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp | 16 ++++++++++++++++
trunk/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp | 6 ++++++
2 files changed, 22 insertions(+), 0 deletions(-)
Modified: trunk/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp
==============================================================================
--- trunk/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp Mon Jun 10 16:34:58 2013 (r84731)
+++ trunk/libs/geometry/index/test/rtree/exceptions/test_exceptions.hpp 2013-06-10 16:36:21 EDT (Mon, 10 Jun 2013) (r84732)
@@ -47,6 +47,14 @@
BOOST_CHECK_THROW( tree.insert(input.begin(), input.end()), throwing_value_copy_exception );
}
+ for ( size_t i = 0 ; i < 20 ; i += 1 )
+ {
+ throwing_value::reset_calls_counter();
+ throwing_value::set_max_calls(i);
+
+ BOOST_CHECK_THROW( Tree tree(input.begin(), input.end(), parameters), throwing_value_copy_exception );
+ }
+
for ( size_t i = 0 ; i < 10 ; i += 1 )
{
throwing_value::reset_calls_counter();
@@ -121,6 +129,14 @@
BOOST_CHECK_THROW( tree.insert(input.begin(), input.end()), throwing_varray_exception );
}
+
+ for ( size_t i = 0 ; i < 100 ; i += 2 )
+ {
+ throwing_varray_settings::reset_calls_counter();
+ throwing_varray_settings::set_max_calls(i);
+
+ BOOST_CHECK_THROW( Tree tree(input.begin(), input.end(), parameters), throwing_varray_exception );
+ }
for ( size_t i = 0 ; i < 50 ; i += 2 )
{
Modified: trunk/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp
==============================================================================
--- trunk/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp Mon Jun 10 16:34:58 2013 (r84731)
+++ trunk/libs/geometry/index/test/rtree/exceptions/test_throwing.hpp 2013-06-10 16:36:21 EDT (Mon, 10 Jun 2013) (r84732)
@@ -122,6 +122,12 @@
container::resize(s);
}
+ inline void reserve(size_type s)
+ {
+ throwing_varray_settings::throw_if_required();
+ container::reserve(s);
+ }
+
void push_back(Element const& v)
{
throwing_varray_settings::throw_if_required();
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