Index: base/memory/scoped_ptr_unittest.cc |
diff --git a/base/memory/scoped_ptr_unittest.cc b/base/memory/scoped_ptr_unittest.cc |
index eb5bf000c48596d12ae97c59aad7c7eaf734ea06..e39e9f271fde405a6911c7b991c16e7748944422 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) { |