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

Unified Diff: base/memory/scoped_ptr_unittest.cc

Issue 11149006: Extend scoped_ptr to be closer to unique_ptr. Support custom deleters, and deleting arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: utility -> algorithm. Mac needs it. Created 8 years, 2 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
Index: base/memory/scoped_ptr_unittest.cc
diff --git a/base/memory/scoped_ptr_unittest.cc b/base/memory/scoped_ptr_unittest.cc
index 3da6f15273181070fa51cc25107708def2fffa1f..6c5f3ac814ba9a68c0c446ebd3689ebddc714af6 100644
--- a/base/memory/scoped_ptr_unittest.cc
+++ b/base/memory/scoped_ptr_unittest.cc
@@ -121,6 +121,15 @@ TEST(ScopedPtrTest, ScopedPtr) {
EXPECT_EQ(0, constructed);
}
+TEST(ScopedPtrTest, ScopedPtrArray) {
+ int constructed = 0;
+
+ {
+ scoped_ptr<int[]> scoper(new int[10]);
+ }
+ EXPECT_EQ(0, constructed);
+}
+
TEST(ScopedPtrTest, ScopedPtrDepthSubtyping) {
int constructed = 0;

Powered by Google App Engine
This is Rietveld 408576698