| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |