|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55099 - trunk/libs/unordered/test/exception
From: daniel_james_at_[hidden]
Date: 2009-07-22 18:37:53
Author: danieljames
Date: 2009-07-22 18:37:52 EDT (Wed, 22 Jul 2009)
New Revision: 55099
URL: http://svn.boost.org/trac/boost/changeset/55099
Log:
Fix the insert tests when there is a small number of buckets.
Text files modified:
trunk/libs/unordered/test/exception/insert_exception_tests.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Modified: trunk/libs/unordered/test/exception/insert_exception_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/exception/insert_exception_tests.cpp (original)
+++ trunk/libs/unordered/test/exception/insert_exception_tests.cpp 2009-07-22 18:37:52 EDT (Wed, 22 Jul 2009)
@@ -195,7 +195,7 @@
rehash_bucket_count = static_cast<size_type>(
ceil(original_bucket_count * (double) x.max_load_factor())) - 1;
- size_type initial_elements = rehash_bucket_count - 5;
+ size_type initial_elements = rehash_bucket_count > 5 ? rehash_bucket_count - 5 : 1;
BOOST_TEST(initial_elements < this->values.size());
x.insert(this->values.begin(),
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