Top "Gmock" questions

Gmock is a mocking framework for Groovy.

google mock - can I call EXPECT_CALL multiple times on same mock object?

If I call EXPECT_CALL twice on the same mock object in the same TEST_F . . . what happens? Are the …

c++ unit-testing googletest gmock googlemock
GMock - returning default value with ON_CALL for overloaded methods

I'm trying to write mock for a class which contains three overloaded methods, ie.: #include <gtest/gtest.h> #…

c++ gmock
how to set custom ref-variable in gmock

I am using gmock in my project and I meet a problem to set a custom reference variable for a …

gmock
Google Mock: multiple expectations on same function with different parameters

Consider the case where a certain mocked function is expected to be called several times, each time with a different …

googletest gmock googlemock
Use google mock's EXPECT_THAT in EXPECT_CALL?

I'm using google mock. The document says that we can use EXPECT_THAT in EXPECT_CALL or ON_CALL, but …

c++ mocking gmock
What is the difference between TEST, TEST_F and TEST_P?

I have researched a lot about gtest/gmock but none of them gave me the right answer. I new to …

googletest gmock
How to set GMock EXPECT_CALL to invoke two different functions for a mocked function

How to invoke two different functions when a mocked function is called in the tested function in "Test suite"? Details: …

c++ gmock
Google Mock - how to name mock functions?

I am just getting started with Google Mock. The For Dummies is reasonably easy to follow. However, I don't understand …

c++ googlemock gmock
Add an external source directory to a CMake build

I'm using Google Mock for my project, and the instructions say it's better to build the library along with the …

cmake gmock
Gmock setting out parameter

In a GMock test method, I need to set the out parameter to a variable's address, so that the out …

c++ gmock