forked from boostorg/unordered
Update tests for standard changes involving bucket count.
It seems my defect report was accepted at some point, and they tweaked the requirements involving bucket counts. This also makes it possible to have a bucket count of 0, which I think wasn't allowed in the past. I don't think I'll change this implementation to do so, but I'd like to be able to run these tests against standard implementations, so I'm starting to take that into account. I believe these changes were made after the C++14 standard, but I've always been tracking the draft standards, so that doesn't really matter.
This commit is contained in:
@@ -51,7 +51,7 @@ void insert_test(X*, float mlf, test::random_generator generator)
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_size = x.size(),
|
||||
old_bucket_count = x.bucket_count();
|
||||
x.insert(*it);
|
||||
if(static_cast<double>(old_size + 1) < b * static_cast<double>(old_bucket_count))
|
||||
if(static_cast<double>(old_size + 1) <= b * static_cast<double>(old_bucket_count))
|
||||
BOOST_TEST(x.bucket_count() == old_bucket_count);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user