//$$CDS-header$$
#include "cppunit/cppunit_proxy.h"
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
namespace ordlist {
namespace cc = cds::container;
l.clear();
CPPUNIT_ASSERT( l.empty() );
-#ifdef CDS_EMPLACE_SUPPORT
// insert test
CPPUNIT_ASSERT( l.emplace( 501 ) );
CPPUNIT_ASSERT( l.emplace( 251, 152 ));
l.clear();
CPPUNIT_ASSERT( l.empty() );
-#endif
// Iterator test
{
{
rcu_lock lock;
value_type * pGet = l.get( a[i] );
- CPPUNIT_ASSERT( pGet != NULL );
+ CPPUNIT_ASSERT( pGet != nullptr );
CPPUNIT_CHECK( pGet->first == a[i] );
CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
ep.release();
{
rcu_lock lock;
- CPPUNIT_CHECK( l.get( a[i]) == NULL );
+ CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
CPPUNIT_CHECK( !l.extract( ep, a[i] ));
CPPUNIT_CHECK( ep.empty() );
}
{
rcu_lock lock;
- CPPUNIT_CHECK( l.get( a[0] ) == NULL );
+ CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
CPPUNIT_CHECK( ep.empty() );
}
{
rcu_lock lock;
value_type * pGet = l.get_with( itm, other_less() );
- CPPUNIT_ASSERT( pGet != NULL );
+ CPPUNIT_ASSERT( pGet != nullptr );
CPPUNIT_CHECK( pGet->first == a[i] );
CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
ep.release();
{
rcu_lock lock;
- CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
+ CPPUNIT_CHECK( l.get_with( itm, other_less()) == nullptr );
CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
CPPUNIT_CHECK( ep.empty() );
}
{
rcu_lock lock;
- CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == NULL );
+ CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == nullptr );
CPPUNIT_CHECK( !l.extract_with( ep, 3.14f, other_less() ));
CPPUNIT_CHECK( ep.empty() );
}
l.clear();
CPPUNIT_ASSERT( l.empty() );
-#ifdef CDS_EMPLACE_SUPPORT
// insert test
CPPUNIT_ASSERT( l.emplace( 501 ) != l.end());
CPPUNIT_ASSERT( l.emplace( 251, 152 ) != l.end());
l.clear();
CPPUNIT_ASSERT( l.empty() );
-#endif
// Iterator test
{