Add find_with calls to intrusive lazy list test.
authorMike Krinkin <krinkin.m.u@gmail.com>
Sat, 28 Mar 2015 11:43:12 +0000 (14:43 +0300)
committerMike Krinkin <krinkin.m.u@gmail.com>
Sat, 28 Mar 2015 12:22:00 +0000 (15:22 +0300)
Similar to ordered intrusive lazy list tests.

tests/test-hdr/unordered_list/hdr_intrusive_lazy.h

index f3702e4a93b7ef9bc7dea7e3b785304f5d0d2b6e..9f1f96c74df394cc324ab3d428bc3dd9133e5c75 100644 (file)
@@ -222,6 +222,7 @@ namespace unordlist {
                     CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
                     CPPUNIT_ASSERT( v1.s.nFindCall == 1 );
 
+                    CPPUNIT_ASSERT( l.find_with( v2.key(), equal_to<value_type>() ) == nullptr );
                     CPPUNIT_ASSERT( l.find( v3.key() ) == nullptr );
                     CPPUNIT_ASSERT( !l.empty() );
 
@@ -246,6 +247,12 @@ namespace unordlist {
                     CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
                     CPPUNIT_ASSERT( v1.s.nFindCall == 2 );
 
+                    CPPUNIT_ASSERT( l.find_with( v2.key(), equal_to<value_type>() ) == &v2 );
+
+                    CPPUNIT_ASSERT( v2.s.nFindCall == 0 );
+                    CPPUNIT_ASSERT( l.find_with( v2.key(), equal_to<value_type>(), find_functor() ));
+                    CPPUNIT_ASSERT( v2.s.nFindCall == 1 );
+
                     CPPUNIT_ASSERT( !l.find( v3.key() ));
 
                     {