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

Unified Diff: base/memory/scoped_ptr_unittest.cc

Issue 1305973011: Change assert() to DCHECK() in scoped_ptr.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add //base dependencies as experiment Created 5 years, 3 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') | chrome_elf/chrome_elf.gyp » ('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 766f4444001e828cd077ca39b85c7dd326779c65..97f49f0cafe67b826e18598a50818eff01323718 100644
--- a/base/memory/scoped_ptr_unittest.cc
+++ b/base/memory/scoped_ptr_unittest.cc
@@ -641,8 +641,7 @@ 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)
+#if DCHECK_IS_ON() && defined(GTEST_HAS_DEATH_TEST)
TEST(ScopedPtrTest, SelfResetAbortsWithDefaultDeleter) {
scoped_ptr<int> x(new int);
EXPECT_DEATH(x.reset(x.get()), "");
@@ -671,7 +670,7 @@ TEST(ScopedPtrTest, SelfResetAbortsWithCustomDeleter) {
TEST(ScopedPtrTest, SelfResetWithCustomDeleterOptOut) {
// A custom deleter should be able to opt out of self-reset abort behavior.
struct NoOpDeleter {
-#if !defined(NDEBUG)
+#if DCHECK_IS_ON()
typedef void AllowSelfReset;
#endif
inline void operator()(int*) {}
« no previous file with comments | « base/memory/scoped_ptr.h ('k') | chrome_elf/chrome_elf.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698