From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/libs/heap/test/binomial_heap_test.cpp | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/boost/libs/heap/test/binomial_heap_test.cpp (limited to 'src/boost/libs/heap/test/binomial_heap_test.cpp') diff --git a/src/boost/libs/heap/test/binomial_heap_test.cpp b/src/boost/libs/heap/test/binomial_heap_test.cpp new file mode 100644 index 00000000..05434e99 --- /dev/null +++ b/src/boost/libs/heap/test/binomial_heap_test.cpp @@ -0,0 +1,72 @@ +/*============================================================================= + Copyright (c) 2010 Tim Blechmann + + Use, modification and distribution is subject to 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) +=============================================================================*/ + +#define BOOST_TEST_MAIN +#include + +#include + +#include + +#include "common_heap_tests.hpp" +#include "stable_heap_tests.hpp" +#include "mutable_heap_tests.hpp" +#include "merge_heap_tests.hpp" + +template +void run_binomial_heap_test(void) +{ + typedef boost::heap::binomial_heap, + boost::heap::compare >, + boost::heap::allocator >, + boost::heap::constant_time_size > pri_queue; + + BOOST_CONCEPT_ASSERT((boost::heap::MutablePriorityQueue)); + BOOST_CONCEPT_ASSERT((boost::heap::MergablePriorityQueue)); + + run_common_heap_tests(); + run_iterator_heap_tests(); + run_copyable_heap_tests(); + run_moveable_heap_tests(); + + run_merge_tests(); + + run_mutable_heap_tests(); + run_ordered_iterator_tests(); + + if (stable) { + typedef boost::heap::binomial_heap, + boost::heap::constant_time_size > stable_pri_queue; + + run_stable_heap_tests(); + } +} + +BOOST_AUTO_TEST_CASE( binomial_heap_test ) +{ + run_binomial_heap_test(); + run_binomial_heap_test(); + run_binomial_heap_test(); + run_binomial_heap_test(); + + RUN_EMPLACE_TEST(binomial_heap); +} + +BOOST_AUTO_TEST_CASE( binomial_heap_compare_lookup_test ) +{ + typedef boost::heap::binomial_heap, + boost::heap::allocator > > pri_queue; + run_common_heap_tests(); +} + +BOOST_AUTO_TEST_CASE( binomial_heap_leak_test ) +{ + typedef boost::heap::binomial_heap > pri_queue; + run_leak_check_test(); +} -- cgit v1.2.3