diff --git a/test/adaptive_pool_test.cpp b/test/adaptive_pool_test.cpp new file mode 100644 index 0000000..51c259f --- /dev/null +++ b/test/adaptive_pool_test.cpp @@ -0,0 +1,77 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2025-2026. 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) +// +// See http://www.boost.org/libs/container for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS +#include +#include +#include +#include "movable_int.hpp" +#include "list_test.hpp" +#include "vector_test.hpp" + +using namespace boost::container; + +typedef test::overaligned_copyable_int oint_t; + +//We will work with wide characters for shared memory objects +//Alias an adaptive pool that allocates ints +typedef adaptive_pool adapt_node_allocator_t; +typedef adaptive_pool adapt_onode_allocator_t; + +typedef adaptive_pool adapt_node_allocator_v1_t; +typedef adaptive_pool adapt_onode_allocator_v1_t; + +namespace boost { +namespace container { + +//Explicit instantiations to catch compilation errors +template class adaptive_pool; +template class adaptive_pool; + +//template class adaptive_pool; +//template class adaptive_pool; + +}} + +//Alias list types +typedef boost::container::list MyList; +typedef boost::container::list MyOList; + +typedef boost::container::list MyListV1; +typedef boost::container::list MyOListV1; + +//Alias vector types +typedef boost::container::vector MyVector; +typedef boost::container::vector MyOVector; + +typedef boost::container::vector MyVectorV1; +typedef boost::container::vector MyOVectorV1; + +int main () +{ + if(test::list_test()) + return 1; + if(test::list_test()) + return 1; + if(test::list_test()) + return 1; + if(test::list_test()) + return 1; + + if(test::vector_test()) + return 1; + if(test::vector_test()) + return 1; + if(test::vector_test()) + return 1; + if(test::vector_test()) + return 1; + + return 0; +}