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

Unified Diff: base/memory/weak_ptr_unittest.cc

Issue 2213933003: Change EXPECT/ASSERT_DCHECK_DEATH macro to not expose the |regex| parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b2b0_simplethreadJoinable
Patch Set: Disabling a death test which crashed instead of DCHECKing : http://crbug.com/634552 Created 4 years, 4 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/bind_unittest.cc ('k') | base/message_loop/message_pump_io_ios_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/weak_ptr_unittest.cc
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc
index e0a46a7feba8aa9ca3d6b51b524fef03d4479ef3..1a4870eab184e39f80fa2dd3d2b7abb797d61ab3 100644
--- a/base/memory/weak_ptr_unittest.cc
+++ b/base/memory/weak_ptr_unittest.cc
@@ -587,7 +587,7 @@ TEST(WeakPtrDeathTest, WeakPtrCopyDoesNotChangeThreadBinding) {
// Although background thread created the copy, it can not deref the copied
// WeakPtr.
- ASSERT_DCHECK_DEATH(background.DeRef(arrow_copy), "");
+ ASSERT_DCHECK_DEATH(background.DeRef(arrow_copy));
background.DeleteArrow(arrow_copy);
}
@@ -609,7 +609,7 @@ TEST(WeakPtrDeathTest, NonOwnerThreadDereferencesWeakPtrAfterReference) {
// Background thread tries to deref target, which violates thread ownership.
BackgroundThread background;
background.Start();
- ASSERT_DCHECK_DEATH(background.DeRef(&arrow), "");
+ ASSERT_DCHECK_DEATH(background.DeRef(&arrow));
}
TEST(WeakPtrDeathTest, NonOwnerThreadDeletesWeakPtrAfterReference) {
@@ -629,7 +629,7 @@ TEST(WeakPtrDeathTest, NonOwnerThreadDeletesWeakPtrAfterReference) {
background.DeRef(&arrow);
// Main thread deletes Target, violating thread binding.
- ASSERT_DCHECK_DEATH(target.reset(), "");
+ ASSERT_DCHECK_DEATH(target.reset());
// |target.reset()| died so |target| still holds the object, so we
// must pass it to the background thread to teardown.
@@ -652,7 +652,7 @@ TEST(WeakPtrDeathTest, NonOwnerThreadDeletesObjectAfterReference) {
// Background thread tries to delete target, volating thread binding.
BackgroundThread background;
background.Start();
- ASSERT_DCHECK_DEATH(background.DeleteTarget(target.release()), "");
+ ASSERT_DCHECK_DEATH(background.DeleteTarget(target.release()));
}
TEST(WeakPtrDeathTest, NonOwnerThreadReferencesObjectAfterDeletion) {
@@ -672,7 +672,7 @@ TEST(WeakPtrDeathTest, NonOwnerThreadReferencesObjectAfterDeletion) {
background.DeleteTarget(target.release());
// Main thread attempts to dereference the target, violating thread binding.
- ASSERT_DCHECK_DEATH(arrow.target.get(), "");
+ ASSERT_DCHECK_DEATH(arrow.target.get());
}
} // namespace base
« no previous file with comments | « base/bind_unittest.cc ('k') | base/message_loop/message_pump_io_ios_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698