From: Mike Krinkin Date: Sat, 28 Mar 2015 11:43:12 +0000 (+0300) Subject: Add find_with calls to intrusive lazy list test. X-Git-Tag: v2.1.0~293^2^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=79f63288b66b28e02b35cec9093d13a2c70331f6;p=libcds.git Add find_with calls to intrusive lazy list test. Similar to ordered intrusive lazy list tests. --- diff --git a/tests/test-hdr/unordered_list/hdr_intrusive_lazy.h b/tests/test-hdr/unordered_list/hdr_intrusive_lazy.h index f3702e4a..9f1f96c7 100644 --- a/tests/test-hdr/unordered_list/hdr_intrusive_lazy.h +++ b/tests/test-hdr/unordered_list/hdr_intrusive_lazy.h @@ -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() ) == 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() ) == &v2 ); + + CPPUNIT_ASSERT( v2.s.nFindCall == 0 ); + CPPUNIT_ASSERT( l.find_with( v2.key(), equal_to(), find_functor() )); + CPPUNIT_ASSERT( v2.s.nFindCall == 1 ); + CPPUNIT_ASSERT( !l.find( v3.key() )); {