{
typedef std::unordered_map<int, std::string> C;
const C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_map<int, std::string> C;
typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
min_allocator<std::pair<const int, std::string>>> C;
const C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
#include <string>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
assert(c.bucket_count() >= 5);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#if TEST_STD_VER >= 11
assert(c.bucket_count() >= 5);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#endif
#include <string>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
test(c);
assert(c.bucket_count() >= 5);
c.reserve(3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.reserve(3);
test(c);
assert(c.bucket_count() >= 5);
c.reserve(3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.reserve(3);
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10));
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c(min_allocator<std::pair<const NotConstructible, NotConstructible> >{});
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
A a(10);
C c(2, a);
- assert(c.bucket_count() == 2);
+ LIBCPP_ASSERT(c.bucket_count() == 2);
assert(c.hash_function() == HF());
assert(c.key_eq() == Comp());
assert(c.get_allocator() == a);
A a(10);
HF hf(12);
C c(2, hf, a);
- assert(c.bucket_count() == 2);
+ LIBCPP_ASSERT(c.bucket_count() == 2);
assert(c.hash_function() == hf);
assert(!(c.hash_function() == HF()));
assert(c.key_eq() == Comp());
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
A()
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
A(10)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
A()
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<std::pair<const int, std::string> >(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
other_allocator<std::pair<const int, std::string> >(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
min_allocator<std::pair<const int, std::string> >()
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<std::pair<const int, std::string> >(10)
);
C c(c0, test_allocator<std::pair<const int, std::string> >(5));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
min_allocator<std::pair<const int, std::string> >()
);
C c(c0, min_allocator<std::pair<const int, std::string> >());
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
}
{
std::unordered_map<int, int> c = {};
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.size() == 0);
assert(c.empty());
assert(std::distance(c.begin(), c.end()) == 0);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_compare<std::equal_to<int> >(9),
test_allocator<std::pair<const int, std::string> >(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
test_compare<std::equal_to<int> >(9),
min_allocator<std::pair<const int, std::string> >()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<std::pair<const int, std::string> >(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
test_allocator<std::pair<const int, std::string> >(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
min_allocator<std::pair<const int, std::string> >()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
min_allocator<std::pair<const int, std::string> >()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(10)
);
C c(std::move(c0), A(10));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
A()
);
C c(std::move(c0), A());
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
10
);
- assert(c.bucket_count() == 11);
+ LIBCPP_ASSERT(c.bucket_count() == 11);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
10
);
- assert(c.bucket_count() == 11);
+ LIBCPP_ASSERT(c.bucket_count() == 11);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
test_compare<std::equal_to<int> >(9),
test_allocator<std::pair<const int, std::string> >(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
test_compare<std::equal_to<int> >(9),
min_allocator<std::pair<const int, std::string> >()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(1) == "one");
assert(c.at(2) == "two");
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c = 7;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c = 7;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_compare<std::equal_to<NotConstructible> >(9),
test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
test_compare<std::equal_to<NotConstructible> >(9),
min_allocator<std::pair<const NotConstructible, NotConstructible> >()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
#include <string>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
{
typedef C::const_iterator I;
typedef std::pair<int, std::string> P;
const C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multimap<int, std::string> C;
#include <string>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
{
P(2, "four"),
};
C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(std::distance(c.begin(), c.end()) == c.size());
assert(std::distance(c.cbegin(), c.cend()) == c.size());
P(2, "four"),
};
const C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(std::distance(c.begin(), c.end()) == c.size());
assert(std::distance(c.cbegin(), c.cend()) == c.size());
#include <string>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
{
P(2, "four"),
};
C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.begin(b);
I j = c.end(b);
P(2, "four"),
};
const C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.begin(b);
I j = c.end(b);
P(2, "four"),
};
C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.cbegin(b);
I j = c.cend(b);
P(2, "four"),
};
const C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.cbegin(b);
I j = c.cend(b);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
assert(c.bucket_count() >= 7);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#if TEST_STD_VER >= 11
assert(c.bucket_count() >= 7);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#endif
#include <string>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
test(c);
assert(c.bucket_count() >= 7);
c.reserve(3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.reserve(3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.reserve(31);
assert(c.bucket_count() >= 16);
test(c);
assert(c.bucket_count() >= 7);
c.reserve(3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.reserve(3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.reserve(31);
assert(c.bucket_count() >= 16);
#include <string>
#include <cassert>
+#include "test_macros.h"
#include "../../test_compare.h"
#include "../../test_hash.h"
#include "test_allocator.h"
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10));
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c(min_allocator<std::pair<const NotConstructible, NotConstructible> >{});
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
A a(10);
C c(2, a);
- assert(c.bucket_count() == 2);
+ LIBCPP_ASSERT(c.bucket_count() == 2);
assert(c.hash_function() == HF());
assert(c.key_eq() == Comp());
assert(c.get_allocator() == a);
A a(10);
HF hf(12);
C c(2, hf, a);
- assert(c.bucket_count() == 2);
+ LIBCPP_ASSERT(c.bucket_count() == 2);
assert(c.hash_function() == hf);
assert(!(c.hash_function() == HF()));
assert(c.key_eq() == Comp());
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(i->first == 1);
A()
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(i->first == 1);
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
A(10)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
A()
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<std::pair<const int, std::string> >(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(i->first == 1);
other_allocator<std::pair<const int, std::string> >(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(i->first == 1);
min_allocator<std::pair<const int, std::string> >()
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(i->first == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<std::pair<const int, std::string> >(10)
);
C c(c0, test_allocator<std::pair<const int, std::string> >(5));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(i->first == 1);
min_allocator<std::pair<const int, std::string> >()
);
C c(c0, min_allocator<std::pair<const int, std::string> >());
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(i->first == 1);
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
}
{
std::unordered_multimap<int, int> c = {};
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.size() == 0);
assert(c.empty());
assert(std::distance(c.begin(), c.end()) == 0);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_compare<std::equal_to<int> >(9),
test_allocator<std::pair<const int, std::string> >(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
test_compare<std::equal_to<int> >(9),
min_allocator<std::pair<const int, std::string> >()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<std::pair<const int, std::string> >(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
test_allocator<std::pair<const int, std::string> >(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
min_allocator<std::pair<const int, std::string> >()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
min_allocator<std::pair<const int, std::string> >()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(10)
);
C c(std::move(c0), A(10));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
A()
);
C c(std::move(c0), A());
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
10
);
- assert(c.bucket_count() == 11);
+ LIBCPP_ASSERT(c.bucket_count() == 11);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
10
);
- assert(c.bucket_count() == 11);
+ LIBCPP_ASSERT(c.bucket_count() == 11);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
test_compare<std::equal_to<int> >(9),
test_allocator<std::pair<const int, std::string> >(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
test_compare<std::equal_to<int> >(9),
min_allocator<std::pair<const int, std::string> >()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Eq eq = c.equal_range(1);
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c = 7;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c = 7;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
NotConstructible> >
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
NotConstructible> >
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
#include <unordered_map>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_compare<std::equal_to<NotConstructible> >(9),
test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
test_compare<std::equal_to<NotConstructible> >(9),
min_allocator<std::pair<const NotConstructible, NotConstructible> >()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() ==
#include <string>
#include <cassert>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
int main()
typedef C::const_iterator I;
typedef int P;
const C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multiset<int> C;
typedef C::const_iterator I;
typedef int P;
const C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multiset<int, std::hash<int>,
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
{
P(2)
};
C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(std::distance(c.begin(), c.end()) == c.size());
assert(std::distance(c.cbegin(), c.cend()) == c.size());
P(2)
};
const C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(std::distance(c.begin(), c.end()) == c.size());
assert(std::distance(c.cbegin(), c.cend()) == c.size());
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
{
P(2)
};
C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.begin(b);
I j = c.end(b);
P(2)
};
const C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.begin(b);
I j = c.end(b);
P(2)
};
C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.cbegin(b);
I j = c.cend(b);
P(2)
};
const C c(a, a + sizeof(a)/sizeof(a[0]));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
C::size_type b = c.bucket(0);
I i = c.cbegin(b);
I j = c.cend(b);
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
assert(c.bucket_count() >= 7);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#if TEST_STD_VER >= 11
assert(c.bucket_count() >= 7);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#endif
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
test(c);
assert(c.bucket_count() >= 7);
c.reserve(3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.reserve(3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.reserve(31);
assert(c.bucket_count() >= 16);
test(c);
assert(c.bucket_count() >= 7);
c.reserve(3);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
test(c);
c.max_load_factor(2);
c.reserve(3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.reserve(31);
assert(c.bucket_count() >= 16);
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../test_compare.h"
#include "../../test_hash.h"
#include "test_allocator.h"
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c(test_allocator<NotConstructible>(10));
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == test_allocator<NotConstructible>(10));
min_allocator<NotConstructible>
> C;
C c(min_allocator<NotConstructible>{});
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == min_allocator<NotConstructible>());
A a(43);
C c(3, a);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
assert(c.hash_function() == HF());
assert(c.key_eq() == Comp ());
assert(c.get_allocator() == a);
HF hf(42);
A a(43);
C c(4, hf, a);
- assert(c.bucket_count() == 4);
+ LIBCPP_ASSERT(c.bucket_count() == 4);
assert(c.hash_function() == hf);
assert(!(c.hash_function() == HF()));
assert(c.key_eq() == Comp ());
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
A()
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
A(10)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
A()
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 4);
A()
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<int>(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
other_allocator<int>(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
min_allocator<int>()
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<int>(10)
);
C c(c0, test_allocator<int>(5));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
min_allocator<int>()
);
C c(c0, min_allocator<int>());
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
C::const_iterator i = c.cbegin();
assert(*i == 1);
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
min_allocator<NotConstructible>
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
}
{
std::unordered_multiset<int> c = {};
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.size() == 0);
assert(c.empty());
assert(std::distance(c.begin(), c.end()) == 0);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_compare<std::equal_to<int> >(9),
test_allocator<int>(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
test_compare<std::equal_to<int> >(9),
min_allocator<int>()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<int>(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
test_allocator<int>(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
min_allocator<int>()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
min_allocator<int>()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(10)
);
C c(std::move(c0), A(10));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
A()
);
C c(std::move(c0), A());
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_compare<std::equal_to<int> >(9),
test_allocator<int>(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
test_compare<std::equal_to<int> >(9),
min_allocator<int>()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(1) == 2);
assert(c.count(2) == 2);
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c = 7;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
min_allocator<NotConstructible>
> C;
C c = 7;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
min_allocator<NotConstructible>
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_compare<std::equal_to<NotConstructible> >(9),
test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>(10)));
test_compare<std::equal_to<NotConstructible> >(9),
min_allocator<std::pair<const NotConstructible, NotConstructible> >()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
int main()
typedef C::const_iterator I;
typedef int P;
const C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_set<int> C;
typedef C::const_iterator I;
typedef int P;
const C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
assert(c.bucket_count() >= 5);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#if TEST_STD_VER >= 11
assert(c.bucket_count() >= 5);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.rehash(3);
rehash_postcondition(c, 3);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
test(c);
c.rehash(31);
rehash_postcondition(c, 31);
- assert(c.bucket_count() == 31);
+ LIBCPP_ASSERT(c.bucket_count() == 31);
test(c);
}
#endif
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class C>
test(c);
assert(c.bucket_count() >= 5);
c.reserve(3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.reserve(3);
test(c);
assert(c.bucket_count() >= 5);
c.reserve(3);
- assert(c.bucket_count() == 5);
+ LIBCPP_ASSERT(c.bucket_count() == 5);
test(c);
c.max_load_factor(2);
c.reserve(3);
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../test_compare.h"
#include "../../test_hash.h"
#include "test_allocator.h"
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
c1.swap(c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c(test_allocator<NotConstructible>(10));
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == test_allocator<NotConstructible>(10));
min_allocator<NotConstructible>
> C;
C c(min_allocator<NotConstructible>{});
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == min_allocator<NotConstructible>());
A a(43);
C c(3, a);
- assert(c.bucket_count() == 3);
+ LIBCPP_ASSERT(c.bucket_count() == 3);
assert(c.hash_function() == HF());
assert(c.key_eq() == Comp ());
assert(c.get_allocator() == a);
HF hf(42);
A a(43);
C c(4, hf, a);
- assert(c.bucket_count() == 4);
+ LIBCPP_ASSERT(c.bucket_count() == 4);
assert(c.hash_function() == hf);
assert(!(c.hash_function() == HF()));
assert(c.key_eq() == Comp ());
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
A()
);
c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cassert>
#include <cfloat>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
A(10)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
A(4)
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
A()
);
c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<int>(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
other_allocator<int>(10)
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
min_allocator<int>()
);
C c = c0;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<int>(10)
);
C c(c0, test_allocator<int>(5));
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
min_allocator<int>()
);
C c(c0, min_allocator<int>());
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
min_allocator<NotConstructible>
> C;
C c;
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
}
{
std::unordered_set<int> c = {};
- assert(c.bucket_count() == 0);
+ LIBCPP_ASSERT(c.bucket_count() == 0);
assert(c.size() == 0);
assert(c.empty());
assert(std::distance(c.begin(), c.end()) == 0);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
},
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_compare<std::equal_to<int> >(9),
test_allocator<int>(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
test_compare<std::equal_to<int> >(9),
min_allocator<int>()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
test_allocator<int>(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
test_allocator<int>(10)
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
min_allocator<int>()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
assert(c.hash_function() == test_hash<std::hash<int> >(8));
assert(c.key_eq() == test_compare<std::equal_to<int> >(9));
min_allocator<int>()
);
C c = std::move(c0);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
C c(input_iterator<P*>(a), input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
7,
test_hash<std::hash<int> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <cfloat>
#include <cmath>
+#include "test_macros.h"
#include "test_iterators.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_compare<std::equal_to<int> >(9),
test_allocator<int>(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
test_compare<std::equal_to<int> >(9),
min_allocator<int>()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(1) == 1);
assert(c.count(2) == 1);
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c = 7;
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_allocator<NotConstructible>
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
min_allocator<NotConstructible>
> C;
C c(7);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
C c(7,
test_hash<std::hash<NotConstructible> >(8)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
test_hash<std::hash<NotConstructible> >(8),
test_compare<std::equal_to<NotConstructible> >(9)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../NotConstructible.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
test_compare<std::equal_to<NotConstructible> >(9),
test_allocator<NotConstructible>(10)
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>(10)));
test_compare<std::equal_to<NotConstructible> >(9),
min_allocator<NotConstructible>()
);
- assert(c.bucket_count() == 7);
+ LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "../../../test_compare.h"
#include "../../../test_hash.h"
#include "test_allocator.h"
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
assert(c1.max_load_factor() == 2);
- assert(c2.bucket_count() == 0);
+ LIBCPP_ASSERT(c2.bucket_count() == 0);
assert(c2.size() == 0);
assert(c2.hash_function() == Hash(1));
assert(c2.key_eq() == Compare(1));
c2.max_load_factor(2);
swap(c1, c2);
- assert(c1.bucket_count() == 0);
+ LIBCPP_ASSERT(c1.bucket_count() == 0);
assert(c1.size() == 0);
assert(c1.hash_function() == Hash(2));
assert(c1.key_eq() == Compare(2));