mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added Catch integration
This commit is contained in:
parent
5e11124901
commit
6daff2167c
5 changed files with 56 additions and 5 deletions
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
[section Acknowledgements]
|
||||
|
||||
Many thanks to Adrien Gervaise, Silvin Lubecki and Takatoshi Kondo !
|
||||
Many thanks to Adrien Gervaise, Silvin Lubecki, Takatoshi Kondo and Ovanes Markarian !
|
||||
|
||||
[endsect]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Not yet released
|
|||
|
||||
* 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
|
||||
|
||||
[endsect]
|
||||
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ The policy can then be activated by defining MOCK_ERROR_POLICY prior to includin
|
|||
|
||||
[define_custom_policy]
|
||||
|
||||
A custom policy for [@https://github.com/philsquared/Catch Catch] is provided and can be enabled simply by including catch.hpp instead of turtle.hpp.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Thread safety]
|
||||
|
|
|
|||
|
|
@ -147,21 +147,22 @@ struct custom_policy
|
|||
{
|
||||
static Result abort()
|
||||
{
|
||||
// ...
|
||||
// Notify the test framework that an error occurs which makes it impossible to continue the test.
|
||||
// This should most likely throw an exception of some kind.
|
||||
}
|
||||
template< typename Context >
|
||||
static void fail( const char* message, const Context& context, const char* file = "unknown location", int line = 0 )
|
||||
{
|
||||
// ...
|
||||
// Notify the test framework that an unexpected call has occurred.
|
||||
}
|
||||
template< typename Context >
|
||||
static void call( const Context& context, const char* file, int line )
|
||||
{
|
||||
// ...
|
||||
// Notify the test framework that an expectation has been fulfilled.
|
||||
}
|
||||
static void pass( const char* file, int line )
|
||||
{
|
||||
// ...
|
||||
// Notify the test framework that the test execution merely passed the given code location.
|
||||
}
|
||||
};
|
||||
//]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue