Added unit tests for IterableKVList<HP>
[libcds.git] / test / unit / list / test_kv_iterable_list.h
index 4bb5769641d8e93af1b0822096c3d047e22572aa..d97f27c6e9855e9348ee9220fe630f96083cea3b 100644 (file)
@@ -278,7 +278,7 @@ namespace cds_test {
                             EXPECT_TRUE( ret.second );
                             EXPECT_TRUE( l.contains( i.key ) );
 
-                            ret = l.upsert( i.key, i.val * 12 );
+                            ret = l.upsert( i.key, i.key * 12 );
                             EXPECT_TRUE( ret.first );
                             EXPECT_FALSE( ret.second );
                             EXPECT_TRUE( l.find( i.key, []( list_value_type& n ) {
@@ -303,8 +303,8 @@ namespace cds_test {
                 } ));
 
                 auto pair = l.update( i.key, []( list_value_type& n, list_value_type* old ) {
-                    EXPECT_FALSE( old == nullptr );
-                    EXPECT_EQ( n.first.nKey * 5, n.second.val );
+                    ASSERT_FALSE( old == nullptr );
+                    EXPECT_EQ( n.first.nKey * 5, old->second.val );
                     n.second.val = n.first.nKey * 3;
                 }, false );
                 EXPECT_TRUE( pair.first );