mirror of
https://github.com/boostorg/poly_collection.git
synced 2026-07-21 13:33:37 +00:00
addressed issue #11 and sprinkled some more checks
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2016-2019 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -56,6 +56,7 @@ void test_allocator_aware_construction()
|
||||
auto d2=get_layout_data<Types...>(p2);
|
||||
rooted_poly_collection p3{std::move(p2)};
|
||||
auto d3=get_layout_data<Types...>(p3);
|
||||
BOOST_TEST(p3==p);
|
||||
BOOST_TEST(d2==d3);
|
||||
BOOST_TEST(p2.empty());
|
||||
do_((BOOST_TEST(!p2.template is_registered<Types>()),0)...);
|
||||
@@ -79,6 +80,8 @@ void test_allocator_aware_construction()
|
||||
rooted_poly_collection p3{std::move(p2),root2};
|
||||
auto d3=get_layout_data<Types...>(p3);
|
||||
|
||||
BOOST_TEST(p3==p);
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<40900)
|
||||
/* Limitations from libstdc++-v3 force move construction with allocator
|
||||
* to decay to copy construction with allocator.
|
||||
@@ -123,9 +126,12 @@ void test_allocator_aware_construction()
|
||||
rooted_poly_collection p3{root2};
|
||||
p3=std::move(p2);
|
||||
auto d3=get_layout_data<Types...>(p3);
|
||||
if(Propagate||AlwaysEqual)BOOST_TEST(d2==d3);
|
||||
BOOST_TEST(p2.empty());
|
||||
do_((BOOST_TEST(!p2.template is_registered<Types>()),0)...);
|
||||
BOOST_TEST(p3==p);
|
||||
if(Propagate||AlwaysEqual){
|
||||
BOOST_TEST(d2==d3);
|
||||
BOOST_TEST(p2.empty());
|
||||
do_((BOOST_TEST(!p2.template is_registered<Types>()),0)...);
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<40900)
|
||||
/* std::unordered_map move assignment always and only propagates unequal
|
||||
|
||||
Reference in New Issue
Block a user