unord test fixes by Edward Meewis

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-12-02 21:23:14 +00:00
parent e814a90f74
commit f836d531b4
73 changed files with 166 additions and 93 deletions

View File

@@ -18,6 +18,7 @@
#include <unordered_map>
#include <string>
#include <cassert>
#include <cfloat>
int main()
{
@@ -36,7 +37,7 @@ int main()
P(80, "eighty"),
};
const C c(std::begin(a), std::end(a));
assert(c.load_factor() == (float)c.size() / c.bucket_count());
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
}
{
typedef std::unordered_multimap<int, std::string> C;