Top "Googlemock" questions

Designed with C++'s specifics in mind, Google C++ Mocking Framework (or Google Mock for short) is a library for writing and using C++ mock classes.

Why the compiler does not recognize Google Mock wildcard?

When I try to use: ON_CALL(mock, foo(_)) Compilation error is thrown: Error 1 error C2065: '_' : undeclared identifier …

c++ googletest googlemock
Using google test to check callbacks

I have a class Foo that stores a pointer to a callback. The callback could be invoked with a method …

c++ googletest googlemock
Google Mock: Mocked overloaded functions create warning C4373

I'm mocking a C++ class which has 2 overloaded functions using Google Mock and VS2010: #include "stdafx.h" #include "gmock/gmock.…

c++ visual-c++ mocking overloading googlemock
Using GMock to verify a Destructor Call

Using GMock, how can I verify that a class's destructor is called? Is there a way, other than to wrap …

c++ unit-testing mocking googlemock
How to use gmock MOCK_METHOD for overloaded operators?

I am new to googlemock (and StackOverflow). I got a problem when using MOCK_METHODn in googlemock and I believe …

c++ googletest googlemock gmock
Mocking non-virtual methods in C++ without editing production code?

I am a fairly new software developer currently working adding unit tests to an existing C++ project that started years …

c++ unit-testing mocking googlemock
Compile error when I #include "gmock/gmock.h"

I'm attempting to integrate googlemock into my tests. I had already successfully built and run tests on googletest, and now …

c++ googlemock
Leaked Mock Objects when using GoogleMock together with Boost::Shared Pointers

For this special scenario, I am not able to get rid of the leaks. I get the message of Leaked …

c++ memory-leaks shared-ptr googlemock
Googletest: How to run tests asynchronously?

Given a large project with thousands of tests, some of which take multiple minutes to complete. When executed sequentially, the …

c++ testing asynchronous googletest googlemock