Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2476)

Unified Diff: base/containers/scoped_ptr_map_unittest.cc

Issue 1479473002: base: Use std::move() instead of Pass() for real movable types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: basepass: missing-include Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/containers/scoped_ptr_map.h ('k') | base/environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/containers/scoped_ptr_map_unittest.cc
diff --git a/base/containers/scoped_ptr_map_unittest.cc b/base/containers/scoped_ptr_map_unittest.cc
index 086c4fe827113a2ef8f648d1a4012291a7be0891..6f867a91498d60318ee65c948ffac619f4d592e6 100644
--- a/base/containers/scoped_ptr_map_unittest.cc
+++ b/base/containers/scoped_ptr_map_unittest.cc
@@ -167,12 +167,12 @@ TEST(ScopedPtrMapTest, Compare) {
// Test the move constructor.
ScopedPtrMap<int, scoped_ptr<int>, std::greater<int>> scoped_map2(
- scoped_map1.Pass());
+ std::move(scoped_map1));
EXPECT_EQ(2u, scoped_map2.size());
EXPECT_TRUE(scoped_map1.empty());
// Test move assignment.
- scoped_map1 = scoped_map2.Pass();
+ scoped_map1 = std::move(scoped_map2);
EXPECT_EQ(2u, scoped_map1.size());
EXPECT_TRUE(scoped_map2.empty());
@@ -203,7 +203,7 @@ TEST(ScopedPtrMapTest, MoveConstruct) {
EXPECT_FALSE(scoped_map.empty());
ScopedPtrMap<int, scoped_ptr<ScopedDestroyer>> scoped_map_copy(
- scoped_map.Pass());
+ std::move(scoped_map));
EXPECT_TRUE(scoped_map.empty());
EXPECT_FALSE(scoped_map_copy.empty());
EXPECT_EQ(elem, scoped_map_copy.find(0)->second);
@@ -223,7 +223,7 @@ TEST(ScopedPtrMapTest, MoveAssign) {
EXPECT_FALSE(scoped_map.empty());
ScopedPtrMap<int, scoped_ptr<ScopedDestroyer>> scoped_map_assign;
- scoped_map_assign = scoped_map.Pass();
+ scoped_map_assign = std::move(scoped_map);
EXPECT_TRUE(scoped_map.empty());
EXPECT_FALSE(scoped_map_assign.empty());
EXPECT_EQ(elem, scoped_map_assign.find(0)->second);
« no previous file with comments | « base/containers/scoped_ptr_map.h ('k') | base/environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698