projects
/
libcds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
movable guarded_ptr: EllenBinTree
[libcds.git]
/
tests
/
test-hdr
/
tree
/
hdr_ellenbintree_map.h
diff --git
a/tests/test-hdr/tree/hdr_ellenbintree_map.h
b/tests/test-hdr/tree/hdr_ellenbintree_map.h
index cf0ccaf8bd3746e0c58c6870d3f7ba5a125bcf27..d4849aa23749c3d7a4f44b81998012e4db574bac 100644
(file)
--- a/
tests/test-hdr/tree/hdr_ellenbintree_map.h
+++ b/
tests/test-hdr/tree/hdr_ellenbintree_map.h
@@
-386,11
+386,11
@@
namespace tree {
int i = 0;
std::pair<key_type, value_type> v;
while ( !m.empty() ) {
int i = 0;
std::pair<key_type, value_type> v;
while ( !m.empty() ) {
- CPPUNIT_ASSERT( m.extract_min( gp ) );
+ gp = m.extract_min();
+ CPPUNIT_ASSERT( gp );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_ASSERT( gp->first == i );
++i;
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_ASSERT( gp->first == i );
++i;
- gp.release();
}
CPPUNIT_ASSERT( m.empty() );
CPPUNIT_ASSERT( check_size( m, 0 ));
}
CPPUNIT_ASSERT( m.empty() );
CPPUNIT_ASSERT( check_size( m, 0 ));
@@
-399,11
+399,11
@@
namespace tree {
fill_map( m, arr );
i = (int) c_nItemCount - 1;
while ( !m.empty() ) {
fill_map( m, arr );
i = (int) c_nItemCount - 1;
while ( !m.empty() ) {
- CPPUNIT_ASSERT( m.extract_max( gp ) );
+ gp = m.extract_max();
+ CPPUNIT_ASSERT( gp );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_ASSERT( gp->first == i );
--i;
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_ASSERT( gp->first == i );
--i;
- gp.release();
}
CPPUNIT_ASSERT( m.empty() );
CPPUNIT_ASSERT( check_size( m, 0 ));
}
CPPUNIT_ASSERT( m.empty() );
CPPUNIT_ASSERT( check_size( m, 0 ));
@@
-411,19
+411,20
@@
namespace tree {
fill_map( m, arr );
for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
int nKey = arr[i];
fill_map( m, arr );
for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
int nKey = arr[i];
- CPPUNIT_ASSERT( m.get( gp, nKey ));
+ gp = m.get( nKey );
+ CPPUNIT_ASSERT( gp );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
- gp
.release(
);
- CPPUNIT_ASSERT(
m.extract( gp, nKey )
);
+ gp
= m.extract( nKey
);
+ CPPUNIT_ASSERT(
gp
);
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
- gp
.release(
);
- CPPUNIT_CHECK( !
m.get( gp, nKey )
);
+ gp
= m.get( nKey
);
+ CPPUNIT_CHECK( !
gp
);
CPPUNIT_CHECK( gp.empty());
CPPUNIT_CHECK( gp.empty());
- CPPUNIT_CHECK( !m.extract(
gp,
nKey ));
+ CPPUNIT_CHECK( !m.extract( nKey ));
CPPUNIT_CHECK( gp.empty());
}
CPPUNIT_ASSERT( m.empty() );
CPPUNIT_CHECK( gp.empty());
}
CPPUNIT_ASSERT( m.empty() );
@@
-432,19
+433,20
@@
namespace tree {
fill_map( m, arr );
for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
int nKey = arr[i];
fill_map( m, arr );
for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
int nKey = arr[i];
- CPPUNIT_ASSERT( m.get_with( gp, wrapped_int(nKey), wrapped_less() ));
+ gp = m.get_with( wrapped_int( nKey ), wrapped_less() );
+ CPPUNIT_ASSERT( gp );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
- gp
.release(
);
- CPPUNIT_ASSERT(
m.extract_with( gp, wrapped_int(nKey), wrapped_less() )
);
+ gp
= m.extract_with( wrapped_int( nKey ), wrapped_less()
);
+ CPPUNIT_ASSERT(
gp
);
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
CPPUNIT_ASSERT( !gp.empty());
CPPUNIT_CHECK( gp->first == nKey );
- gp
.release(
);
- CPPUNIT_CHECK( !
m.get_with( gp, wrapped_int(nKey), wrapped_less() )
);
+ gp
= m.get_with( wrapped_int( nKey ), wrapped_less()
);
+ CPPUNIT_CHECK( !
gp
);
CPPUNIT_CHECK( gp.empty());
CPPUNIT_CHECK( gp.empty());
- CPPUNIT_CHECK( !m.extract_with(
gp,
wrapped_int(nKey), wrapped_less() ));
+ CPPUNIT_CHECK( !m.extract_with( wrapped_int(nKey), wrapped_less() ));
CPPUNIT_CHECK( gp.empty());
}
CPPUNIT_CHECK( gp.empty());
}