| Index: base/bind_unittest.cc
|
| diff --git a/base/bind_unittest.cc b/base/bind_unittest.cc
|
| index 8718d1da85f75fd53ea9f5f66d54506fc8d2adea..dde2226f64cb82c4bf41d54bab6fa8e852b796d2 100644
|
| --- a/base/bind_unittest.cc
|
| +++ b/base/bind_unittest.cc
|
| @@ -4,12 +4,6 @@
|
|
|
| #include "base/bind.h"
|
|
|
| -#if defined(BASE_CALLBACK_H_)
|
| -// We explicitly do not want to include callback.h so people are not tempted
|
| -// to use bind.h in a headerfile for getting the Callback types.
|
| -#error "base/bind.h should avoid pulling in callback.h by default."
|
| -#endif
|
| -
|
| #include "base/callback.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -317,6 +311,15 @@ TEST_F(BindTest, ReturnValues) {
|
| EXPECT_EQ(51337, const_method_const_obj_cb.Run());
|
| }
|
|
|
| +// IgnoreReturn adapter test.
|
| +// - Function with return value, and no params can be converted to Closure.
|
| +TEST_F(BindTest, IgnoreReturn) {
|
| + EXPECT_CALL(static_func_mock_, IntMethod0()).WillOnce(Return(1337));
|
| + Callback<int(void)> normal_cb = Bind(&IntFunc0);
|
| + Closure c = IgnoreReturn(normal_cb);
|
| + c.Run();
|
| +}
|
| +
|
| // Argument binding tests.
|
| // - Argument binding to primitive.
|
| // - Argument binding to primitive pointer.
|
|
|