mirror of
https://github.com/boostorg/unordered.git
synced 2025-11-03 01:01:42 +01:00
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:
@@ -91,7 +91,7 @@ namespace test
|
||||
|
||||
// Check the load factor.
|
||||
|
||||
float load_factor =
|
||||
float load_factor = size == 0 ? 0 :
|
||||
static_cast<float>(size) / static_cast<float>(x1.bucket_count());
|
||||
using namespace std;
|
||||
if(fabs(x1.load_factor() - load_factor) > x1.load_factor() / 64)
|
||||
|
||||
Reference in New Issue
Block a user