Add support for unlimited number of sequences in one call

This removes the need for those preprocessor macros and the MOCK_MAX_SEQUENCES define.
This commit is contained in:
Alexander Grund 2022-02-07 19:26:26 +01:00
parent c34e4224fe
commit bb77c1702f
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
5 changed files with 18 additions and 27 deletions

View file

@ -15,7 +15,7 @@ Released -
* Removed MOCK_*_TPL as they are no longer required, use the non _TPL variant even for templates
* Added MOCK_PROTECT_SIGNATURE to pass function signatures with commas in the return type
* Remove support for protecting function signatures via BOOST_IDENTITY_TYPE, use MOCK_PROTECT_SIGNATURE instead
* Add support for unlimitted number of arguments making MOCK_MAX_ARGS superflous
* Add support for unlimitted number of arguments and sequences making MOCK_MAX_ARGS and MOCK_MAX_SEQUENCES superflous
[endsect]

View file

@ -449,10 +449,7 @@ Synopsis :
Each sequence is an instance of mock::sequence.
The maximum number of sequences that can be set is MOCK_MAX_SEQUENCES which defaults to 10. If needed the value can be increased before including the library :
#define MOCK_MAX_SEQUENCES 12
#include <turtle/mock.hpp>
The maximum number of sequences that can be set is basically unlimited.
Example :
@ -467,7 +464,7 @@ An action performs additional treatments after an expectation has been deemed va
Synopsis :
MOCK_EXPECT( identifier ).returns( value ); // stored internally by copy
MOCK_EXPECT( identifier ).moves( value ); // stored internally by copy
MOCK_EXPECT( identifier ).moves( value ); // stored internally by copy/move
MOCK_EXPECT( identifier ).throws( exception ); // stored internally by copy
MOCK_EXPECT( identifier ).calls( functor ); // stored internally by copy, throws std::invalid_argument if empty