Updated documentation

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@655 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-05-20 10:48:43 +00:00
parent 367f772575
commit 415cece00e
6 changed files with 11 additions and 11 deletions

View file

@ -46,7 +46,7 @@ project example
compile example/motivation.cpp ; compile example/motivation.cpp ;
compile example/getting_started.cpp ; compile example/getting_started.cpp ;
compile example/customisation.cpp ; compile example/customization.cpp ;
compile example/patterns_async_call.cpp ; compile example/patterns_async_call.cpp ;
compile example/patterns_retrieve_cref.cpp ; compile example/patterns_retrieve_cref.cpp ;
compile example/patterns_invoke_functor.cpp ; compile example/patterns_invoke_functor.cpp ;

View file

@ -82,7 +82,7 @@ Released 23 March 2011
* Fixed a bug preventing to increase the maximum number of arguments of a mocked method using MOCK_MAX_ARGS * 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 * Changed the default value for MOCK_MAX_ARGS to 9 instead of 10
* Renamed mock::constraint to mock::call * Renamed mock::constraint to mock::call
* Added custom constraints logging customisation in the same way as parameters * Added custom constraints logging customization 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 * 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 lazily serializing constraints and parameters * Enhanced logging by lazily serializing constraints and parameters
* Added the possibility to perform conversions when logging constraints and parameters by defining MOCK_USE_CONVERSIONS * Added the possibility to perform conversions when logging constraints and parameters by defining MOCK_USE_CONVERSIONS

View file

@ -1,12 +1,12 @@
[section Customisation] [section Customization]
[import example/customisation.cpp] [import example/customization.cpp]
This section explains how to customise different aspects of the library. This section explains how to customize different aspects of the library.
[section Logging] [section Logging]
The library will perform logging lazily, e.g. only when actually needed, which is usually because an error happens but it depends on the [link turtle.customisation.test_framework_integration test framework integration] used. The library will perform logging lazily, e.g. only when actually needed, which is usually because an error happens but it depends on the [link turtle.customization.test_framework_integration test framework integration] used.
Parameters and [link turtle.customisation.constraints constraints] are serialized to report meaningful diagnostics of the failures. Parameters and [link turtle.customization.constraints constraints] are serialized to report meaningful diagnostics of the failures.
By default the library attempts to serialize to an std::ostream and if this is not possible will use a '?'. By default the library attempts to serialize to an std::ostream and if this is not possible will use a '?'.
@ -62,7 +62,7 @@ Using the custom constraint is also pretty trivial, for instance :
Simple enough, however this constraint isn't serializable and thus yields a rather uninformative '?' in the logs. Simple enough, however this constraint isn't serializable and thus yields a rather uninformative '?' in the logs.
Just like a parameter, a constraint can be displayed in a readable form using its serialization operator, see [link turtle.customisation.logging logging]. Just like a parameter, a constraint can be displayed in a readable form using its serialization operator, see [link turtle.customization.logging logging].
Thus a widely used constraint (for instance one shipped with the code of a library) is likely better to be defined like this : Thus a widely used constraint (for instance one shipped with the code of a library) is likely better to be defined like this :
@ -97,7 +97,7 @@ The use of boost::unwrap_ref provides support for passing arguments as reference
See [link turtle.reference.expectation.constraints constraints] for an explanation of how the library detects whether an argument is a functor or a value. See [link turtle.reference.expectation.constraints constraints] for an explanation of how the library detects whether an argument is a functor or a value.
For more information about the serialization operator and the use of mock::format, refer to [link turtle.customisation.logging loggin]. For more information about the serialization operator and the use of mock::format, refer to [link turtle.customization.logging loggin].
[note The [link turtle.reference.helpers.mock_unary_constraint MOCK_UNARY_CONSTRAINT] and [link turtle.reference.helpers.mock_binary_constraint MOCK_BINARY_CONSTRAINT] macros replace the need to write the constraints explicitly for the most trivial cases] [note The [link turtle.reference.helpers.mock_unary_constraint MOCK_UNARY_CONSTRAINT] and [link turtle.reference.helpers.mock_binary_constraint MOCK_BINARY_CONSTRAINT] macros replace the need to write the constraints explicitly for the most trivial cases]

View file

@ -62,7 +62,7 @@ During the execution of a test case, an error can happen for one of the followin
* untriggered expectation if a remaining match has not been fulfilled when destroying the mock object (typically logs an error) * untriggered expectation if a remaining match has not been fulfilled when destroying the mock object (typically logs an error)
* missing action if a method supposed to return something else than void has not been configured properly (typically logs an error and throws an exception) * missing action if a method supposed to return something else than void has not been configured properly (typically logs an error and throws an exception)
The exact type of the exception thrown depends on the [link turtle.customisation.test_framework_integration test framework integration] used. The exact type of the exception thrown depends on the [link turtle.customization.test_framework_integration test framework integration] used.
An error log typically looks like : An error log typically looks like :

View file

@ -23,7 +23,7 @@ Turtle is a C++ [@http://en.wikipedia.org/wiki/Mock_object Mock object] library
[include motivation.qbk] [include motivation.qbk]
[include getting_started.qbk] [include getting_started.qbk]
[include customisation.qbk] [include customization.qbk]
[/ [xinclude reference.xml] ] [/ [xinclude reference.xml] ]
[include reference.qbk] [include reference.qbk]
[include patterns.qbk] [include patterns.qbk]