Index: base/memory/scoped_ptr_unittest.cc |
diff --git a/base/memory/scoped_ptr_unittest.cc b/base/memory/scoped_ptr_unittest.cc |
index ad49f4ff5cc43c3fcc969b736feebe4ec9cdcc11..6330bb9e207c86c74a8c05f5d84ac1e7b4c57f8e 100644 |
--- a/base/memory/scoped_ptr_unittest.cc |
+++ b/base/memory/scoped_ptr_unittest.cc |
@@ -641,46 +641,6 @@ TEST(ScopedPtrTest, Conversion) { |
super2 = SubClassReturn(); |
} |
-// Android death tests don't work properly with assert(). Yay. |
-#if !defined(NDEBUG) && defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID) |
-TEST(ScopedPtrTest, SelfResetAbortsWithDefaultDeleter) { |
- scoped_ptr<int> x(new int); |
- EXPECT_DEATH(x.reset(x.get()), ""); |
-} |
- |
-TEST(ScopedPtrTest, SelfResetAbortsWithDefaultArrayDeleter) { |
- scoped_ptr<int[]> y(new int[4]); |
- EXPECT_DEATH(y.reset(y.get()), ""); |
-} |
- |
-TEST(ScopedPtrTest, SelfResetAbortsWithDefaultFreeDeleter) { |
- scoped_ptr<int, base::FreeDeleter> z(static_cast<int*>(malloc(sizeof(int)))); |
- EXPECT_DEATH(z.reset(z.get()), ""); |
-} |
- |
-// A custom deleter that doesn't opt out should still crash. |
-TEST(ScopedPtrTest, SelfResetAbortsWithCustomDeleter) { |
- struct CustomDeleter { |
- inline void operator()(int* x) { delete x; } |
- }; |
- scoped_ptr<int, CustomDeleter> x(new int); |
- EXPECT_DEATH(x.reset(x.get()), ""); |
-} |
-#endif |
- |
-TEST(ScopedPtrTest, SelfResetWithCustomDeleterOptOut) { |
- // A custom deleter should be able to opt out of self-reset abort behavior. |
- struct NoOpDeleter { |
-#if !defined(NDEBUG) |
- typedef void AllowSelfReset; |
-#endif |
- inline void operator()(int*) {} |
- }; |
- scoped_ptr<int> owner(new int); |
- scoped_ptr<int, NoOpDeleter> x(owner.get()); |
- x.reset(x.get()); |
-} |
- |
// Logging a scoped_ptr<T> to an ostream shouldn't convert it to a boolean |
// value first. |
TEST(ScopedPtrTest, LoggingDoesntConvertToBoolean) { |