mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
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:
parent
c34e4224fe
commit
bb77c1702f
5 changed files with 18 additions and 27 deletions
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue