X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Flist%2Ftest_intrusive_iterable_list.h;h=3bdfaa68403c7c957bb365fdfecfebb9212e5aef;hb=3fe8bd899a639149ba95ee1cba48bd656ef555ce;hp=00c5c9839f1abe4e79a4f6f49ee6e8f14051a373;hpb=686510ecc01f1c07fa168b35a5d255fb8304dab6;p=libcds.git diff --git a/test/unit/list/test_intrusive_iterable_list.h b/test/unit/list/test_intrusive_iterable_list.h index 00c5c983..3bdfaa68 100644 --- 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 ); - switch ( i.nKey % 3 ) { + switch ( i.nKey % 4 ) { case 0: EXPECT_TRUE( l.insert( i )); break; @@ -276,6 +276,17 @@ namespace cds_test { EXPECT_EQ( ret.second, true ); } break; + case 3: + { + std::pair 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 ));