mirror of
https://github.com/BlackMATov/flat.hpp.git
synced 2025-12-14 18:01:41 +07:00
remove Allocator template param
This commit is contained in:
@@ -119,16 +119,16 @@ TEST_CASE("flat_map") {
|
||||
int,
|
||||
unsigned,
|
||||
std::less<int>,
|
||||
alloc_t>;
|
||||
std::vector<std::pair<int,unsigned>, alloc_t>>;
|
||||
|
||||
using map2_t = flat_map<
|
||||
int,
|
||||
unsigned,
|
||||
std::greater<int>,
|
||||
alloc_t>;
|
||||
std::vector<std::pair<int,unsigned>, alloc_t>>;
|
||||
|
||||
using vec_t = std::vector<
|
||||
std::pair<int,unsigned>>;
|
||||
std::pair<int,unsigned>, alloc_t>;
|
||||
|
||||
{
|
||||
auto s0 = map_t();
|
||||
@@ -162,13 +162,6 @@ TEST_CASE("flat_map") {
|
||||
REQUIRE(vec_t(s3.begin(), s3.end()) == vec_t({{0,1},{1,2}}));
|
||||
}
|
||||
|
||||
{
|
||||
auto s0 = map_t();
|
||||
auto s1 = map_t(alloc_t(42));
|
||||
REQUIRE(s0.get_allocator().i == 0);
|
||||
REQUIRE(s1.get_allocator().i == 42);
|
||||
}
|
||||
|
||||
{
|
||||
auto s0 = map_t{{0,1}, {1,2}};
|
||||
auto s1 = s0;
|
||||
@@ -179,8 +172,6 @@ TEST_CASE("flat_map") {
|
||||
REQUIRE(s2 == map_t{{0,1}, {1,2}});
|
||||
auto s3 = map_t(s2, alloc_t(42));
|
||||
REQUIRE(s2 == s3);
|
||||
REQUIRE(s2.get_allocator().i == 0);
|
||||
REQUIRE(s3.get_allocator().i == 42);
|
||||
auto s4 = map_t(std::move(s3), alloc_t(21));
|
||||
REQUIRE(s3.empty());
|
||||
REQUIRE(s4 == map_t{{0,1}, {1,2}});
|
||||
@@ -251,7 +242,6 @@ TEST_CASE("flat_map") {
|
||||
int,
|
||||
unsigned,
|
||||
std::less<int>,
|
||||
alloc2_t,
|
||||
std::deque<std::pair<int, unsigned>, alloc2_t>>;
|
||||
|
||||
map2_t s1;
|
||||
|
||||
@@ -110,8 +110,8 @@ TEST_CASE("flat_set") {
|
||||
}
|
||||
SECTION("ctors") {
|
||||
using alloc_t = dummy_allocator<int>;
|
||||
using set_t = flat_set<int, std::less<int>, alloc_t>;
|
||||
using set2_t = flat_set<int, std::greater<int>, alloc_t>;
|
||||
using set_t = flat_set<int, std::less<int>, std::vector<int, alloc_t>>;
|
||||
using set2_t = flat_set<int, std::greater<int>, std::vector<int, alloc_t>>;
|
||||
using vec_t = std::vector<int>;
|
||||
|
||||
{
|
||||
@@ -146,13 +146,6 @@ TEST_CASE("flat_set") {
|
||||
REQUIRE(vec_t(s3.begin(), s3.end()) == vec_t({2,1,0}));
|
||||
}
|
||||
|
||||
{
|
||||
auto s0 = set_t();
|
||||
auto s1 = set_t(alloc_t(42));
|
||||
REQUIRE(s0.get_allocator().i == 0);
|
||||
REQUIRE(s1.get_allocator().i == 42);
|
||||
}
|
||||
|
||||
{
|
||||
auto s0 = set_t{0,1,2};
|
||||
auto s1 = s0;
|
||||
@@ -163,8 +156,6 @@ TEST_CASE("flat_set") {
|
||||
REQUIRE(s2 == set_t{0,1,2});
|
||||
auto s3 = set_t(s2, alloc_t(42));
|
||||
REQUIRE(s2 == s3);
|
||||
REQUIRE(s2.get_allocator().i == 0);
|
||||
REQUIRE(s3.get_allocator().i == 42);
|
||||
auto s4 = set_t(std::move(s3), alloc_t(21));
|
||||
REQUIRE(s3.empty());
|
||||
REQUIRE(s4 == set_t{0,1,2});
|
||||
@@ -233,7 +224,6 @@ TEST_CASE("flat_set") {
|
||||
using set2_t = flat_set<
|
||||
int,
|
||||
std::less<int>,
|
||||
alloc2_t,
|
||||
std::deque<int, alloc2_t>>;
|
||||
|
||||
set2_t s1;
|
||||
|
||||
Reference in New Issue
Block a user