My favorites | Sign in
Logo
                
People details
Project owners:
  chandlerc, vladlosev, zhanyong.wan
Project committers:
mierle, markus.heule, tsunanet, nnorwitz

Welcome to Google C++ Mocking Framework!

Inspired by jMock, EasyMock, and Hamcrest, and 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. Google Mock:

We have enjoyed using Google Mock in many projects at Google, and hope you find it useful too!

System Requirements

Google Mock is not a testing framework itself. Instead, it needs a testing framework for writing tests. Google Mock works seamlessly with Google Test. It comes with a copy of Google Test bundled. Starting with version 1.1.0, you can also use it with any C++ testing framework of your choice.

Google Mock has been tested with gcc 4.0+ and Microsoft Visual C++ 8.0 SP1. Users reported that it also works with gcc 3.4, Microsoft Visual C++ 7.1, and Cygwin, although we haven't tested it there ourselves.

Getting Started

If you are new to the project, we suggest to read the user documentation in the following order:

You can also watch Zhanyong's talk on Google Mock's usage and implementation.

Once you understand the basics, check out the rest of the docs:

If you need help, please check the KnownIssues and FrequentlyAskedQuestions before posting a question on the googlemock discussion group.

We'd love to have your help! Please read the DevGuide if you are willing to contribute to the development.

Happy mocking!