forked from boostorg/unordered
Add node-based foa container to at_tests
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
// Copyright 2007-2009 Daniel James.
|
// Copyright 2007-2009 Daniel James.
|
||||||
// Copyright 2022 Christian Mazakas.
|
// Copyright 2022-2023 Christian Mazakas.
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
// 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)
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
@ -11,16 +11,12 @@
|
|||||||
|
|
||||||
namespace at_tests {
|
namespace at_tests {
|
||||||
|
|
||||||
UNORDERED_AUTO_TEST (at_tests) {
|
template <class X> static void at_tests(X*)
|
||||||
|
{
|
||||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Create Map" << std::endl;
|
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Create Map" << std::endl;
|
||||||
|
|
||||||
#ifdef BOOST_UNORDERED_FOA_TESTS
|
X x;
|
||||||
boost::unordered_flat_map<std::string, int> x;
|
X const& x_const(x);
|
||||||
boost::unordered_flat_map<std::string, int> const& x_const(x);
|
|
||||||
#else
|
|
||||||
boost::unordered_map<std::string, int> x;
|
|
||||||
boost::unordered_map<std::string, int> const& x_const(x);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Check empty container" << std::endl;
|
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Check empty container" << std::endl;
|
||||||
|
|
||||||
@ -64,6 +60,21 @@ namespace at_tests {
|
|||||||
|
|
||||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Finished" << std::endl;
|
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Finished" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
#ifdef BOOST_UNORDERED_FOA_TESTS
|
||||||
|
static boost::unordered_flat_map<std::string, int>* test_map;
|
||||||
|
static boost::unordered_node_map<std::string, int>* test_node_map;
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
UNORDERED_TEST(at_tests, ((test_map)(test_node_map)))
|
||||||
|
// clang-format on
|
||||||
|
#else
|
||||||
|
static boost::unordered_map<std::string, int>* test_map;
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
UNORDERED_TEST(at_tests, ((test_map)))
|
||||||
|
// clang-format on
|
||||||
|
#endif
|
||||||
|
} // namespace at_tests
|
||||||
|
|
||||||
RUN_TESTS()
|
RUN_TESTS()
|
||||||
|
Reference in New Issue
Block a user