This release focusses on providing a better API for compilers with variadic macros support :
The main changes are twofold, first they deal with making it possible to write code such as
MOCK_BASE_CLASS( mock_class, base_class< int, int > ) {};
Whereas previously the compiler would refuse to pass 3 arguments where the macro was accepting only two.
Then the MOCK_METHOD macro has been extended to support the following combinations :
MOCK_BASE_CLASS( mock_class, base_class ) { MOCK_METHOD( method, 0 ) // as before, method must be a virtual member function in base_class MOCK_METHOD( method, 0, void() ) // equivalent to MOCK_METHOD_EXT( method, 0, void(), method ) MOCK_METHOD( method, 0, void(), method ) // also equivalent to MOCK_METHOD_EXT( method, 0, void(), method ) };
The MOCK_METHOD_EXT macro remains supported for compilers which do not have variadic macros.
For more information see http://turtle.sf.net