Menu

Turtle / News: Recent posts

Turtle 1.3.1 has been released !

This release has long been overdue and brings mostly bug fixes and increased C++17 support:

  • Fixed mocking of a function returning a reference for gcc 4.1
  • Added MOCK_NO_AUTO_PTR to deactivate std::auto_ptr support
  • Added [@https://github.com/philsquared/Catch Catch] integration
  • Fixed move-only type argument in actions
  • Fixed move-only type support in constraints
  • Added support for dereferencing in mock::equal
  • Added support for movable objects in mock::retrieve
  • Fixed deprecation warning about std::uncaught_exception in c++17 for msvc... read more
Posted by Mathieu Champlon 2019-03-07

Turtle 1.3.0 has been released !

This release fixes a compilation error when building with VS2015.

A side effect is that the round parenthesis syntax used to wrap signatures containing commas has now become deprecated: it may or may not work dependening on the compiler used.

The recommended way now is:

MOCK_CLASS( mock_class )
{
    MOCK_METHOD( method, 0, BOOST_IDENTITY_TYPE((std::map< int, int >())) )
};

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2016-07-18

Turtle 1.2.8 has been released !

This release fixes a few bugs.

  • Fixed missing thread synchronization in mock::sequence
  • Fixed build errors with Boost 1.59
  • Fixed multiply defined symbol definition for MOCK_FUNCTION included from several translation units
  • Fixed extra semicolon warning with BOOST_GLOBAL_FIXTURE prior to Boost 1.59
  • Added logging support for boost::optional

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2016-02-09

Turtle 1.2.7 has been released !

This release fixes a few bugs.

  • Dropped support for obsolete Boost.Phoenix V2
  • Added support for multiple parameters constraints
  • Added inline to generated MOCK_FUNCTION
  • Documented limitation concerning MOCK_METHOD_TPL
  • Fixed mocking protected member function
  • Document how actions store data by copy

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2015-04-25

Turtle source code has moved to GitHub

The new source repository has become https://github.com/mat007/turtle
Pull requests are welcome !

Posted by Mathieu Champlon 2015-03-05

Turtle 1.2.6 has been released !

This release adds thread safety support.

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2014-05-29

Turtle 1.2.5 has been released !

This release introduces compatibility breaking changes.

  • Added workaround for when msvc defines small and near macros
  • Added support for using non default calling conventions
  • Changed MOCK_DESTRUCTOR which now requires '~' to preceed the class name
  • Changed MOCK_*CONVERSION_OPERATOR* which now require an extra first argument 'operator'
  • Added version.hpp with the library version number

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2014-02-08

Turtle 1.2.4 has been released !

This release introduces several changes to support C++11 features :

  • Reworked MOCK_CONSTRAINT to be able to provide names to parameters
  • Added MOCK_NO_VARIADIC_MACROS to deactivate variadic macros support
  • Added support for movable only types as parameters
  • Added logging support for std::unique_ptr, std::shared_ptr and std::weak_ptr
  • Added move support in actions

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2013-08-14

Turtle 1.2.3 has been released !

This is a maintenance release with the following changes :

  • Added support for C++11 lambdas as constraints
  • Return actions now accept by copy types derived from abstract base types
  • Added MOCK_CONSTRAINT helper macro
  • Added support for several sequences in 'in'
  • Added support for nullptr as constraint
  • Added mock::close, mock::close_fraction, mock::small and mock::near constraints

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2013-05-20

Turtle 1.2.2 has been released !

This release focusses on providing a better API for compilers with variadic macros support :

  • Added variadic macro support for MOCK_BASE_CLASS
  • Added variadic macro support for MOCK_FUNCTION, MOCK_FUNCTOR and the MOCK_METHOD family
  • Added round parenthesis support for signatures for MOCK_FUNCTION, MOCK_FUNCTOR and the MOCK_METHOD family
  • Added MOCK_CONVERSION_OPERATOR_TPL, MOCK_CONST_CONVERSION_OPERATOR_TPL and MOCK_NON_CONST_CONVERSION_OPERATOR_TPL
  • Added MOCK_FUNCTOR_TPL... read more
Posted by Mathieu Champlon 2013-03-09

Turtle 1.2.1 has been released !

This is a maintenance release with the following changes :

  • Fixed boost::lambda_functor forward declaration
  • Added test for whether BOOST_RESULT_OF_NUM_ARGS is large enough
  • Removed default error policy keeping only Boost.Test integration
  • Refactored error policy to simplify test frameworks integration
  • Changed C-string constraint short-cut behaviour to compare strings instead of pointers
  • Fixed potential conflict with macro max
  • Fixed missing file name and line number in logs
  • Moved mock::exception in its own header so that it can be included without the error policy
  • Fixed type name extraction involving template classes... read more
Posted by Mathieu Champlon 2013-01-24

Turtle 1.2.0 has been released !

This is a major release which unifies member functions and functors, and introduces mock functions and mock static member functions.
As a side effect backward compatibility could not be preserved, and existing code has to be adapted.

Before Now
MOCK_FUNCTOR( signature ) functor; MOCK_FUNCTOR( functor, signature );
MOCK_EXPECT( object, identifier ) MOCK_EXPECT( object.identifier )
MOCK_EXPECT( pointer, identifier ) MOCK_EXPECT( pointer->identifier )
MOCK_EXPECT( functor, _ ) MOCK_EXPECT( functor )
MOCK_VERIFY( object, identifier ) MOCK_VERIFY( object.identifier )
MOCK_VERIFY( pointer, identifier ) MOCK_VERIFY( pointer->identifier )
MOCK_VERIFY( functor, _ ) MOCK_VERIFY( functor )
MOCK_RESET( object, identifier ) MOCK_RESET( object.identifier )
MOCK_RESET( pointer, identifier ) MOCK_RESET( pointer->identifier )
MOCK_RESET( functor, _ ) MOCK_RESET( functor )
object.verify() mock::verify( object )
object.reset() mock::reset( object )... read more
Posted by Mathieu Champlon 2012-05-25

Turtle 1.1.1 has been released !

This is a maintenance release with the following changes :

  • Added support for boost::cref and boost::ref in built-in constraints and mock::format
  • Removed MOCK_METHOD_TPL for using non compliant code
  • Added a mock::affirm constraint as evaluating ''actual'' as a boolean
  • Fixed a bug preventing non-const pointers to be logged properly
  • Added support for logging std::auto_ptr, boost::shared_ptr and boost::weak_ptr
  • Added missing check for BOOST_FT_MAX_ARITY when MOCK_MAX_ARGS was set to 21 or higher
  • Fixed a bug with const smart pointers as first argument to MOCK_EXPECT being invalid
  • Fixed a crash with Boost.Test when destroying failed static mock objects... read more
Posted by Mathieu Champlon 2011-07-10

Turtle 1.1.0 has been released !

This is a bug fix and enhancements release with the following changes :

  • Added Boost.Test log info when an expectation is fulfilled
  • Fixed a bug preventing to increase the maximum number of arguments of a mocked method using MOCK_MAX_ARGS
  • Changed the default value for MOCK_MAX_ARGS to 9 instead of 10
  • Renamed mock::constraint to mock::call
  • Added custom constraints logging customisation in the same way as parameters
  • Changed the way the default logging of constraints and parameters can be overridden to use a serialization operator to a mock::stream
  • Enhanced logging by lazy serialising constraints and parameters
  • Added the possibility to perform conversions when logging constraints and parameters by defining MOCK_USE_CONVERSIONS... read more
Posted by Mathieu Champlon 2011-03-26

Turtle 1.0.1 has been released !

This is a maintenance release with the following changes :

  • Destroying a sequence does not remove the associated order call enforcement anymore
  • Added detection for a pointer in mock::assign to dereference it before performing the assignment
  • Renamed error policies no_match method to unexpected_call
  • Made boost_test_error_policy throw a mock::exception extending boost::execution_aborted (helpful in order to filter on exceptions)
  • Fully qualified function calls to prevent unwanted ADL
  • Added extra namespace level to protect from unwanted ADL with operator<<
  • Fixed a crash due to static initialization order fiasco on some platforms
  • Added support for mocking conversion operators
  • Added concept checks for better diagnostic upon compilation error
  • Made template parameter names more user friendly for better diagnostic upon compilation error
  • Fixed expectation argument types to match signature
  • Shared parent names among their expectations when a mock::object is used as a base class
  • Fixed maximum number of mocked methods arguments
  • Prevented a crash when mocking a destructor and throwing out of the object scope... read more
Posted by Mathieu Champlon 2010-06-16

Turtle 1.0.0 has been released !

Turtle is an open-source C++ mock object library based on Boost with a focus on usability, simplicity and flexibility.
Driven by years of using different other mock object libraries both in C++ and Java, this library is already being used successfully in a production environment.

For more information see http://turtle.sf.net

Posted by Mathieu Champlon 2010-02-09