mirror of
				https://github.com/boostorg/unordered.git
				synced 2025-11-03 17:21:48 +01:00 
			
		
		
		
	Add foa-based node containers to swap_tests
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
			
		||||
 | 
			
		||||
// Copyright 2006-2009 Daniel James.
 | 
			
		||||
// Copyright 2022 Christian Mazakas.
 | 
			
		||||
// Copyright 2022-2023 Christian Mazakas.
 | 
			
		||||
// 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)
 | 
			
		||||
 | 
			
		||||
@@ -168,19 +168,58 @@ namespace swap_tests {
 | 
			
		||||
    test::cxx11_allocator<test::object, test::no_propagate_swap> >*
 | 
			
		||||
    test_map_no_prop_swap;
 | 
			
		||||
 | 
			
		||||
  boost::unordered_node_map<test::object, test::object, test::hash,
 | 
			
		||||
    test::equal_to, std::allocator<test::object> >* test_node_map_std_alloc;
 | 
			
		||||
 | 
			
		||||
  boost::unordered_node_set<test::object, test::hash, test::equal_to,
 | 
			
		||||
    test::allocator1<test::object> >* test_node_set;
 | 
			
		||||
  boost::unordered_node_map<test::object, test::object, test::hash,
 | 
			
		||||
    test::equal_to, test::allocator1<test::object> >* test_node_map;
 | 
			
		||||
 | 
			
		||||
  boost::unordered_node_set<test::object, test::hash, test::equal_to,
 | 
			
		||||
    test::cxx11_allocator<test::object, test::propagate_swap> >*
 | 
			
		||||
    test_node_set_prop_swap;
 | 
			
		||||
  boost::unordered_node_map<test::object, test::object, test::hash,
 | 
			
		||||
    test::equal_to, test::cxx11_allocator<test::object, test::propagate_swap> >*
 | 
			
		||||
    test_node_map_prop_swap;
 | 
			
		||||
 | 
			
		||||
  boost::unordered_node_set<test::object, test::hash, test::equal_to,
 | 
			
		||||
    test::cxx11_allocator<test::object, test::no_propagate_swap> >*
 | 
			
		||||
    test_node_set_no_prop_swap;
 | 
			
		||||
  boost::unordered_node_map<test::object, test::object, test::hash,
 | 
			
		||||
    test::equal_to,
 | 
			
		||||
    test::cxx11_allocator<test::object, test::no_propagate_swap> >*
 | 
			
		||||
    test_node_map_no_prop_swap;
 | 
			
		||||
 | 
			
		||||
  UNORDERED_AUTO_TEST (check_traits) {
 | 
			
		||||
    BOOST_TEST(!is_propagate(test_set));
 | 
			
		||||
    BOOST_TEST(is_propagate(test_set_prop_swap));
 | 
			
		||||
    BOOST_TEST(!is_propagate(test_set_no_prop_swap));
 | 
			
		||||
 | 
			
		||||
    BOOST_TEST(!is_propagate(test_node_set));
 | 
			
		||||
    BOOST_TEST(is_propagate(test_node_set_prop_swap));
 | 
			
		||||
    BOOST_TEST(!is_propagate(test_node_set_no_prop_swap));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
// clang-format off
 | 
			
		||||
  UNORDERED_TEST(swap_tests1,
 | 
			
		||||
    ((test_map_std_alloc)(test_set)(test_map)(test_set_prop_swap)(test_map_prop_swap)(test_set_no_prop_swap)(test_map_no_prop_swap))(
 | 
			
		||||
    ((test_map_std_alloc)(test_set)(test_map)
 | 
			
		||||
     (test_set_prop_swap)(test_map_prop_swap)
 | 
			
		||||
     (test_set_no_prop_swap)(test_map_no_prop_swap)
 | 
			
		||||
     (test_node_map_std_alloc)(test_node_set)(test_node_map)
 | 
			
		||||
     (test_node_set_prop_swap)(test_node_map_prop_swap)
 | 
			
		||||
     (test_node_set_no_prop_swap)(test_node_map_no_prop_swap))(
 | 
			
		||||
      (default_generator)(generate_collisions)(limited_range)))
 | 
			
		||||
 | 
			
		||||
  UNORDERED_TEST(swap_tests2,
 | 
			
		||||
    ((test_set)(test_map)(test_set_prop_swap)(test_map_prop_swap)(test_set_no_prop_swap)(test_map_no_prop_swap))(
 | 
			
		||||
    ((test_set)(test_map)
 | 
			
		||||
     (test_set_prop_swap)(test_map_prop_swap)
 | 
			
		||||
     (test_set_no_prop_swap)(test_map_no_prop_swap)
 | 
			
		||||
     (test_node_set)(test_node_map)
 | 
			
		||||
     (test_node_set_prop_swap)(test_node_map_prop_swap)
 | 
			
		||||
     (test_node_set_no_prop_swap)(test_node_map_no_prop_swap))(
 | 
			
		||||
      (default_generator)(generate_collisions)(limited_range)))
 | 
			
		||||
// clang-format on
 | 
			
		||||
#else
 | 
			
		||||
  boost::unordered_map<test::object, test::object, test::hash, test::equal_to,
 | 
			
		||||
    std::allocator<test::object> >* test_map_std_alloc;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user