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

Unified Diff: skia/ext/refptr_unittest.cc

Issue 1477643002: Remove the TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03 macro. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basepass
Patch Set: type-with-move: no-media Created 5 years 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 | « skia/ext/refptr.h ('k') | sync/api/entity_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/refptr_unittest.cc
diff --git a/skia/ext/refptr_unittest.cc b/skia/ext/refptr_unittest.cc
index a356a64a2ed831b9a1ee58c976bb9443d2e62d0b..237f43909d8af39d7d8fc13f979b21e51bb9bfb1 100644
--- a/skia/ext/refptr_unittest.cc
+++ b/skia/ext/refptr_unittest.cc
@@ -180,11 +180,11 @@ TEST(RefPtrTest, AssignmentFromTemporary) {
TEST(RefPtrTest, PassIntoArguments) {
// No ref count changes when passing an argument with Pass().
RefPtr<RefCountCounter> object = skia::AdoptRef(new RefCountCounter);
- RefPtr<RefCountCounter> object2 = object.Pass();
+ RefPtr<RefCountCounter> object2 = std::move(object);
auto lambda = [](RefPtr<RefCountCounter> arg) {
EXPECT_EQ(0, arg->ref_count_changes());
};
- lambda(object2.Pass());
+ lambda(std::move(object2));
}
class DestructionNotifier : public SkRefCnt {
@@ -196,15 +196,6 @@ class DestructionNotifier : public SkRefCnt {
bool* flag_;
};
-TEST(RefPtrTest, PassIntoSelf) {
- bool is_destroyed = false;
- RefPtr<DestructionNotifier> object =
- skia::AdoptRef(new DestructionNotifier(&is_destroyed));
- object = object.Pass();
- ASSERT_FALSE(is_destroyed);
- EXPECT_TRUE(object->unique());
-}
-
TEST(RefPtrTest, Nullptr) {
RefPtr<SkRefCnt> null(nullptr);
EXPECT_FALSE(null);
« no previous file with comments | « skia/ext/refptr.h ('k') | sync/api/entity_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698