python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Is there a way in gmock to return modified input arg without invoke?
I want to do something like this:
EXPECT_CALL(*mock, method(5)).WillOnce(Return(arg1 * 2));
where arg1 should be equal to first arg of called method. Is there a way to do that without testing::Invoke...
IzZy
Votes: 0
Answers: 2
Return multiple mock objects from a mocked factory function which returns std::unique_ptr
How to return multiple mock objects from a mocked factory function which returns std::unique_ptr?
Return(ByMove(...)) cannot be used to return multiple times.
Trying to work from this answer:
https://...
Martin G
Votes: 0
Answers: 1
How to mock method with default parameter in Google Mock C++?
How to mock a method with optional parameter in Google Mock? For example:
I try this, but it does not work:
template <typename T>
class A
{
public:
virtual void set_enable(const int test, c...

Son_Nguyen
Votes: 0
Answers: 0
Returning multiple unique_ptr from factory mock
How can I return multiple object from a mocked factory returning unique_ptr, when the calls cannot be identified through different input parameters to the called function?
I'm doing this:
EXPECT_CALL(...
Martin G
Votes: 0
Answers: 1