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

Side by Side Diff: base/bind_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 unified diff | Download patch
« no previous file with comments | « no previous file | base/memory/weak_ptr_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1093
1094 Callback<int()> stdcall_cb = Bind(&StdCallFunc, 2); 1094 Callback<int()> stdcall_cb = Bind(&StdCallFunc, 2);
1095 EXPECT_EQ(2, stdcall_cb.Run()); 1095 EXPECT_EQ(2, stdcall_cb.Run());
1096 } 1096 }
1097 #endif 1097 #endif
1098 1098
1099 // Test null callbacks cause a DCHECK. 1099 // Test null callbacks cause a DCHECK.
1100 TEST(BindDeathTest, NullCallback) { 1100 TEST(BindDeathTest, NullCallback) {
1101 base::Callback<void(int)> null_cb; 1101 base::Callback<void(int)> null_cb;
1102 ASSERT_TRUE(null_cb.is_null()); 1102 ASSERT_TRUE(null_cb.is_null());
1103 EXPECT_DCHECK_DEATH(base::Bind(null_cb, 42), ""); 1103 EXPECT_DCHECK_DEATH(base::Bind(null_cb, 42));
1104 } 1104 }
1105 1105
1106 } // namespace 1106 } // namespace
1107 } // namespace base 1107 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/memory/weak_ptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698