unit_tests: fix build with boost 1.69

This commit is contained in:
moneromooo-monero 2019-10-11 01:15:00 +00:00
parent aa72c21d84
commit 77afe91db6
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -893,7 +893,8 @@ TEST(dandelionpp_map, empty)
TEST(dandelionpp_map, zero_stems)
{
std::vector<boost::uuids::uuid> connections{6};
std::generate(connections.begin(), connections.end(), boost::uuids::random_generator{});
for (auto &c: connections)
c = boost::uuids::random_generator{}();
net::dandelionpp::connection_map mapper{connections, 0};
EXPECT_EQ(mapper.begin(), mapper.end());
@ -917,7 +918,8 @@ TEST(dandelionpp_map, zero_stems)
TEST(dandelionpp_map, dropped_connection)
{
std::vector<boost::uuids::uuid> connections{6};
std::generate(connections.begin(), connections.end(), boost::uuids::random_generator{});
for (auto &c: connections)
c = boost::uuids::random_generator{}();
std::sort(connections.begin(), connections.end());
// select 3 of 6 outgoing connections
@ -953,7 +955,8 @@ TEST(dandelionpp_map, dropped_connection)
}
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(), boost::uuids::random_generator{});
for (auto &c: in_connections)
c = boost::uuids::random_generator{}();
{
std::map<boost::uuids::uuid, std::size_t> used;
std::multimap<boost::uuids::uuid, boost::uuids::uuid> inverse_mapping;