mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 19:08:53 +00:00
unit_tests: fix build with CLANG 8 and boost 1.69
This commit is contained in:
parent
98af2e954b
commit
a5c7eebaea
@ -1040,7 +1040,8 @@ TEST(dandelionpp_map, dropped_connection_remapped)
|
||||
boost::uuids::random_generator random_uuid{};
|
||||
|
||||
std::vector<boost::uuids::uuid> connections{3};
|
||||
std::generate(connections.begin(), connections.end(), random_uuid);
|
||||
for (auto &e: connections)
|
||||
e = random_uuid();
|
||||
std::sort(connections.begin(), connections.end());
|
||||
|
||||
// select 3 of 3 outgoing connections
|
||||
@ -1070,7 +1071,8 @@ TEST(dandelionpp_map, dropped_connection_remapped)
|
||||
}
|
||||
std::map<boost::uuids::uuid, boost::uuids::uuid> mapping;
|
||||
std::vector<boost::uuids::uuid> in_connections{9};
|
||||
std::generate(in_connections.begin(), in_connections.end(), random_uuid);
|
||||
for (auto &e: in_connections)
|
||||
e = random_uuid();
|
||||
{
|
||||
std::map<boost::uuids::uuid, std::size_t> used;
|
||||
std::multimap<boost::uuids::uuid, boost::uuids::uuid> inverse_mapping;
|
||||
@ -1149,7 +1151,8 @@ TEST(dandelionpp_map, dropped_connection_remapped)
|
||||
}
|
||||
// map 8 new incoming connections across 3 outgoing links
|
||||
in_connections.resize(18);
|
||||
std::generate(in_connections.begin() + 10, in_connections.end(), random_uuid);
|
||||
for (size_t i = 10; i < in_connections.size(); ++i)
|
||||
in_connections[i] = random_uuid();
|
||||
{
|
||||
std::map<boost::uuids::uuid, std::size_t> used;
|
||||
for (const boost::uuids::uuid& connection : in_connections)
|
||||
@ -1176,7 +1179,8 @@ TEST(dandelionpp_map, dropped_all_connections)
|
||||
boost::uuids::random_generator random_uuid{};
|
||||
|
||||
std::vector<boost::uuids::uuid> connections{8};
|
||||
std::generate(connections.begin(), connections.end(), random_uuid);
|
||||
for (auto &e: connections)
|
||||
e = random_uuid();
|
||||
std::sort(connections.begin(), connections.end());
|
||||
|
||||
// select 3 of 8 outgoing connections
|
||||
@ -1205,7 +1209,8 @@ TEST(dandelionpp_map, dropped_all_connections)
|
||||
}
|
||||
}
|
||||
std::vector<boost::uuids::uuid> in_connections{9};
|
||||
std::generate(in_connections.begin(), in_connections.end(), random_uuid);
|
||||
for (auto &e: in_connections)
|
||||
e = random_uuid();
|
||||
{
|
||||
std::map<boost::uuids::uuid, std::size_t> used;
|
||||
std::map<boost::uuids::uuid, boost::uuids::uuid> mapping;
|
||||
@ -1237,7 +1242,8 @@ TEST(dandelionpp_map, dropped_all_connections)
|
||||
|
||||
// select 3 of 30 connections, only 7 should be remapped to new indexes (but all to new uuids)
|
||||
connections.resize(30);
|
||||
std::generate(connections.begin(), connections.end(), random_uuid);
|
||||
for (auto &e: connections)
|
||||
e = random_uuid();
|
||||
EXPECT_TRUE(mapper.update(connections));
|
||||
{
|
||||
std::map<boost::uuids::uuid, std::size_t> used;
|
||||
|
Loading…
Reference in New Issue
Block a user