Turtle / News: Recent posts

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