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

Unified Diff: base/memory/scoped_ptr_unittest.cc

Issue 1763983002: Change scoped_ptr to a type alias for std::unique_ptr on OS_WIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bluetooth Created 4 years, 9 months 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/memory/scoped_ptr.h ('k') | device/bluetooth/bluetooth_remote_gatt_service_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/scoped_ptr_unittest.cc
diff --git a/base/memory/scoped_ptr_unittest.cc b/base/memory/scoped_ptr_unittest.cc
index 0e4f979db491b10672e42ba557759a365ed6720d..c3da8e998d82c02efa7933d493119876623d1f9d 100644
--- a/base/memory/scoped_ptr_unittest.cc
+++ b/base/memory/scoped_ptr_unittest.cc
@@ -669,16 +669,6 @@ TEST(ScopedPtrTest, ReferenceCycle) {
// deletes the underlying pointer. This behaviour is consistent with the
// definition of unique_ptr::reset in C++11.
a->b.reset();
-
- // Go again, but this time, break the cycle by invoking |a|'s destructor. This
- // tests that the implementation of ~scoped_ptr doesn't infinitely recurse
- // into the destructors of |a| and |a->b|. Note, deleting |a| instead will
- // cause |a| to be double-free'd because |a->b| owns |a| and deletes it via
- // its destructor.
- a = new StructA;
- a->b.reset(new StructB);
- a->b->a.reset(a);
- a->~StructA();
}
TEST(ScopedPtrTest, Operators) {
« no previous file with comments | « base/memory/scoped_ptr.h ('k') | device/bluetooth/bluetooth_remote_gatt_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698