$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r80513 - trunk/libs/heap/test
From: tim_at_[hidden]
Date: 2012-09-13 14:54:51
Author: timblechmann
Date: 2012-09-13 14:54:50 EDT (Thu, 13 Sep 2012)
New Revision: 80513
URL: http://svn.boost.org/trac/boost/changeset/80513
Log:
heap: add test case for ticket no 7358
Text files modified: 
   trunk/libs/heap/test/binomial_heap_test.cpp  |     8 ++++++++                                
   trunk/libs/heap/test/common_heap_tests.hpp   |     9 +++++++++                               
   trunk/libs/heap/test/d_ary_heap_test.cpp     |     8 ++++++++                                
   trunk/libs/heap/test/fibonacci_heap_test.cpp |     8 ++++++++                                
   trunk/libs/heap/test/pairing_heap_tests.cpp  |     8 ++++++++                                
   trunk/libs/heap/test/skew_heap_test.cpp      |     8 ++++++++                                
   6 files changed, 49 insertions(+), 0 deletions(-)
Modified: trunk/libs/heap/test/binomial_heap_test.cpp
==============================================================================
--- trunk/libs/heap/test/binomial_heap_test.cpp	(original)
+++ trunk/libs/heap/test/binomial_heap_test.cpp	2012-09-13 14:54:50 EDT (Thu, 13 Sep 2012)
@@ -58,3 +58,11 @@
     run_binomial_heap_test<true, false>();
     run_binomial_heap_test<true, true>();
 }
+
+BOOST_AUTO_TEST_CASE( binomial_heap_compare_lookup_test )
+{
+    typedef boost::heap::binomial_heap<int,
+                                       boost::heap::compare<less_with_T>,
+                                       boost::heap::allocator<std::allocator<int> > > pri_queue;
+    run_common_heap_tests<pri_queue>();
+}
Modified: trunk/libs/heap/test/common_heap_tests.hpp
==============================================================================
--- trunk/libs/heap/test/common_heap_tests.hpp	(original)
+++ trunk/libs/heap/test/common_heap_tests.hpp	2012-09-13 14:54:50 EDT (Thu, 13 Sep 2012)
@@ -440,4 +440,13 @@
     check_q(q, data);
 }
 
+struct less_with_T
+{
+    typedef int T;
+    bool operator()(const int& a, const int& b) const
+    {
+        return a < b;
+    }
+};
+
 #endif // COMMON_HEAP_TESTS_HPP_INCLUDED
Modified: trunk/libs/heap/test/d_ary_heap_test.cpp
==============================================================================
--- trunk/libs/heap/test/d_ary_heap_test.cpp	(original)
+++ trunk/libs/heap/test/d_ary_heap_test.cpp	2012-09-13 14:54:50 EDT (Thu, 13 Sep 2012)
@@ -112,3 +112,11 @@
     run_d_ary_heap_mutable_test<4, true>();
     run_d_ary_heap_mutable_test<5, true>();
 }
+
+BOOST_AUTO_TEST_CASE( d_ary_heap_compare_lookup_test )
+{
+    typedef boost::heap::d_ary_heap<int, boost::heap::arity<2>,
+                                    boost::heap::compare<less_with_T>,
+                                    boost::heap::allocator<std::allocator<int> > > pri_queue;
+    run_common_heap_tests<pri_queue>();
+}
Modified: trunk/libs/heap/test/fibonacci_heap_test.cpp
==============================================================================
--- trunk/libs/heap/test/fibonacci_heap_test.cpp	(original)
+++ trunk/libs/heap/test/fibonacci_heap_test.cpp	2012-09-13 14:54:50 EDT (Thu, 13 Sep 2012)
@@ -62,3 +62,11 @@
     run_fibonacci_heap_test<false, false>();
     run_fibonacci_heap_test<false, true>();
 }
+
+BOOST_AUTO_TEST_CASE( fibonacci_heap_compare_lookup_test )
+{
+    typedef boost::heap::fibonacci_heap<int,
+                                       boost::heap::compare<less_with_T>,
+                                       boost::heap::allocator<std::allocator<int> > > pri_queue;
+    run_common_heap_tests<pri_queue>();
+}
Modified: trunk/libs/heap/test/pairing_heap_tests.cpp
==============================================================================
--- trunk/libs/heap/test/pairing_heap_tests.cpp	(original)
+++ trunk/libs/heap/test/pairing_heap_tests.cpp	2012-09-13 14:54:50 EDT (Thu, 13 Sep 2012)
@@ -60,3 +60,11 @@
     run_pairing_heap_test<true, false>();
     run_pairing_heap_test<true, true>();
 }
+
+BOOST_AUTO_TEST_CASE( pairing_heap_compare_lookup_test )
+{
+    typedef boost::heap::pairing_heap<int,
+                                      boost::heap::compare<less_with_T>,
+                                      boost::heap::allocator<std::allocator<int> > > pri_queue;
+    run_common_heap_tests<pri_queue>();
+}
Modified: trunk/libs/heap/test/skew_heap_test.cpp
==============================================================================
--- trunk/libs/heap/test/skew_heap_test.cpp	(original)
+++ trunk/libs/heap/test/skew_heap_test.cpp	2012-09-13 14:54:50 EDT (Thu, 13 Sep 2012)
@@ -106,3 +106,11 @@
     run_skew_heap_mutable_test<true, false>();
     run_skew_heap_mutable_test<true, true>();
 }
+
+BOOST_AUTO_TEST_CASE( skew_heap_compare_lookup_test )
+{
+    typedef boost::heap::skew_heap<int,
+                                   boost::heap::compare<less_with_T>,
+                                   boost::heap::allocator<std::allocator<int> > > pri_queue;
+    run_common_heap_tests<pri_queue>();
+}