Top "Gmock" questions

Gmock is a mocking framework for Groovy.

Gmock - matching structures

How can I match value of an element in a union for an input argument e.g - if I …

c++ gmock
gmock multiple in-out parameters SetArgReferee

I have an interface Itest: class Itest { bool testfunction(vector<int>& v, int& id); } I can …

reference gmock
Mock non-virtual method C++ (gmock)

I have class class CSumWnd : public CBaseWnd { private: bool MethodA() } Please can you help how to mock MethodA() without making …

c++ mocking gmock
Can gmock be used for stubbing C functions?

I am new to gmock, so I want to know how can I stub simple C function called in a …

c unit-testing googletest gmock
Mocking Parametrized Constructor using Gmock

I have class to be mocked but it does not have a default constructor. I cannot change the source code, …

c++ constructor mocking googletest gmock
How to inspect argument to a gmock EXPECT_CALL()?

I'm using Google Mock (gMock) for the first time. Given the following code snippet: class LinkSignals { public: virtual ~LinkSignals() { } virtual …

unit-testing testing automated-tests gmock
Google mock ByRef method

I have a class that takes a boolean as a reference parameter and returns an integer: class Foo { public: Bar …

c++ googletest gmock
How to specify consecutive returns in gmock?

In Mockito we can specify multiple returns like (taken from here): //you can set different behavior for consecutive method calls. //…

c++ mockito googletest googlemock gmock
Is there a way to make mock functions "interesting" with ON_CALL?

Given: #include "gmock/gmock.h" #include <string> using namespace testing; // tsk, tsk // -- -- -- -- -- -- …

c++ unit-testing gmock
GMock: How to return mock class variable as the return value

I am trying to use GMock (google mocking framework for c++) for the first time. I have the following class: …

c++ unit-testing googletest googlemock gmock