Google C++ Mocking Framework (or Google Mock for short) is a library for writing and using C++ mock classes. Google Mock:
In this post i will be covering the procedure to install GMock in Ubuntu. Below are the steps:
- lets you create mock classes trivially using simple macros,
- supports a rich set of matchers and actions,
- handles unordered, partially ordered, or completely ordered expectations,
- is extensible by users, and
- works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and Symbian.
In this post i will be covering the procedure to install GMock in Ubuntu. Below are the steps:
- Download GMock from https://code.google.com/p/googlemock/downloads/list and extract it to a folder (Lets say $(GMOCK_DIR))
- GMock already has a copy of GTest inside it , so there is no need to get another copy of GTest.
- If cmake is not installed , install cmake using command sudo apt-get install cmake
- Go to GMock Directory using command cd $(GMOCK_DIR)
- Run command cmake CMakeLists.txt and then make
- This will create a library libgmock.a in your current directory.
- Now your GMock and GTest setup is ready.