Permalink
Browse files

bind stub member variable

  • Loading branch information...
jpihl committed Apr 24, 2017
1 parent b510199 commit b7184934d6411f0602f16e79d7acb3e9d42fccd3
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/src/test_function.cpp
View
@@ -489,3 +489,19 @@ TEST(test_function, check_virtual_destructor)
EXPECT_EQ(0U, count);
}
namespace
{
struct dummy
{
stub::function<void()> member;
};
}
TEST(test_function, bind_member_variable)
{
dummy d;
auto b = std::bind(&dummy::member, d);
b();
EXPECT_TRUE(d.member.expect_calls().with().to_bool());
}

0 comments on commit b718493

Please sign in to comment.