Projects / Google C++ Mocking Framework

Google C++ Mocking Framework

Google C++ Mocking Framework (or Google Mock for short) is a library for writing and using C++ mock classes. It was inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in mind. It 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, and is extensible by users.

Tags
Licenses
Operating Systems
Implementation

Recent releases

  •  16 Apr 2010 21:44

    Release Notes: Google Mock can now be safely used in multi-threaded tests on platforms supporting pthreads. Changes and new features to simplify writing of custom matchers (a function for printing a value of an arbitrary type; the function ExplainMatchResult for easy definition of composite matchers; a new matcher API that allows defining custom explanations easily and efficiently; and better failure messages for composing matchers.) NotNull() and IsNull() now work with smart pointers. Regular expression matchers now work on all platforms. Google Mock Doctor now supports GCC 4.0.

    •  02 Oct 2009 22:18

      Release Notes: An ACTION_TEMPLATE macro for easily defining custom actions. An .After() clause for specifying expectation order. More built-in actions, matchers, and utilities. No more dependency on Boost. This release works on Symbian, Windows Mobile, and minGW now.

      •  19 Mar 2009 04:54

        Release Notes: You can now use Google Mock with any testing framework. Macros for easily defining new matchers and new actions were added, more container matchers were defined, actions for accessing function arguments and throwing exceptions were added, and the Google Mock doctor script was improved. Bugs were fixed. The implementation was cleaned up.

        Screenshot

        Project Spotlight

        OpenStack4j

        A Fluent OpenStack client API for Java.

        Screenshot

        Project Spotlight

        TurnKey TWiki Appliance

        A TWiki appliance that is easy to use and lightweight.