addressed issue #11 and sprinkled some more checks

This commit is contained in:
joaquintides
2019-02-06 12:18:52 +01:00
parent 8a67013729
commit d13e8ba7ba
+10 -4
View File
@@ -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