diff --git a/test/node_allocator_test.cpp b/test/node_allocator_test.cpp new file mode 100644 index 0000000..832cbc0 --- /dev/null +++ b/test/node_allocator_test.cpp @@ -0,0 +1,72 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (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. +// +////////////////////////////////////////////////////////////////////////////// +#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; + +//Alias adaptive pools that allocates ints +typedef node_allocator node_allocator_t; +typedef node_allocator adapt_onode_allocator_t; + +typedef node_allocator node_allocator_v1_t; +typedef node_allocator adapt_onode_allocator_v1_t; + +namespace boost { +namespace container { + +//Explicit instantiations to catch compilation errors +template class node_allocator; +template class node_allocator; + +}} //boost::container + +//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; +}