google / google/googletest

Pointee with overloaded functions

Open
#2,003 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

I have the following overloaded mock functions
MOCK_METHOD1_T(function, void(int value));
MOCK_METHOD1_T(function, void(std::shared_ptr pointer));

if expect the call
EXPECT_CALL(*mock_object, function(testing::Pointee(10))).
Times(2);

I can't compile it, because the call of the overloaded function is ambiguous.
How can I solve this problem.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.