projects
/
libcds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'dev' of github.com:khizmax/libcds into dev
[libcds.git]
/
test
/
unit
/
list
/
test_intrusive_iterable_list.h
diff --git
a/test/unit/list/test_intrusive_iterable_list.h
b/test/unit/list/test_intrusive_iterable_list.h
index 00c5c9839f1abe4e79a4f6f49ee6e8f14051a373..3bdfaa68403c7c957bb365fdfecfebb9212e5aef 100644
(file)
--- a/
test/unit/list/test_intrusive_iterable_list.h
+++ b/
test/unit/list/test_intrusive_iterable_list.h
@@
-246,7
+246,7
@@
namespace cds_test {
EXPECT_FALSE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
EXPECT_EQ( i.s.nFindCall, 0 );
EXPECT_FALSE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
EXPECT_EQ( i.s.nFindCall, 0 );
- switch ( i.nKey %
3
) {
+ switch ( i.nKey %
4
) {
case 0:
EXPECT_TRUE( l.insert( i ));
break;
case 0:
EXPECT_TRUE( l.insert( i ));
break;
@@
-276,6
+276,17
@@
namespace cds_test {
EXPECT_EQ( ret.second, true );
}
break;
EXPECT_EQ( ret.second, true );
}
break;
+ case 3:
+ {
+ std::pair<bool, bool> ret = l.update( i, false );
+ EXPECT_EQ( ret.first, false );
+ EXPECT_EQ( ret.second, false );
+
+ ret = l.update( i );
+ EXPECT_EQ( ret.first, true );
+ EXPECT_EQ( ret.second, true );
+ }
+ break;
}
EXPECT_TRUE( l.contains( i.nKey ));
}
EXPECT_TRUE( l.contains( i.nKey ));