mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fixed documentation issues
This commit is contained in:
parent
6daff2167c
commit
2a635f1ef6
3 changed files with 14 additions and 56 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#[Turtle](http://turtle.sourceforge.net)
|
||||
|
||||
Turtle is a C++ mock object library based on Boost with a focus on usability, simplicity and flexibility.
|
||||
|
||||
### Test results
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <boost/test/auto_unit_test.hpp>
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
namespace limitations_template_base_class_method_problem
|
||||
namespace
|
||||
{
|
||||
//[ limitations_template_base_class_method_problem
|
||||
template< typename T >
|
||||
|
|
@ -32,47 +32,3 @@ MOCK_BASE_CLASS( mock_base, base< T > )
|
|||
};
|
||||
//]
|
||||
}
|
||||
|
||||
namespace limitations_template_base_class_method_problem_2
|
||||
{
|
||||
//[ limitations_template_base_class_method_problem_2
|
||||
class concept
|
||||
{
|
||||
public:
|
||||
template< typename T >
|
||||
T create()
|
||||
{
|
||||
return T();
|
||||
}
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
void function_under_test( T t ) // T is supposed to model the previous concept
|
||||
{
|
||||
t.template create< int >();
|
||||
t.template create< std::string >();
|
||||
}
|
||||
//]
|
||||
|
||||
//[ limitations_template_base_class_method_solution_2
|
||||
MOCK_CLASS( mock_concept )
|
||||
{
|
||||
template< typename T >
|
||||
T create();
|
||||
|
||||
MOCK_METHOD( create_int, 0, int(), create_int )
|
||||
MOCK_METHOD( create_string, 0, std::string(), create_string )
|
||||
};
|
||||
|
||||
template<>
|
||||
int mock_concept::create< int >()
|
||||
{
|
||||
return create_int();
|
||||
}
|
||||
template<>
|
||||
std::string mock_concept::create< std::string >()
|
||||
{
|
||||
return create_string();
|
||||
}
|
||||
//]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
[import example/limitations_literal_zero.cpp]
|
||||
[import example/limitations_throw_specifier.cpp]
|
||||
[import example/limitations_non_virtual_method.cpp]
|
||||
[import example/limitations_template_base_class_method.cpp]
|
||||
[import example/limitations_template_method.cpp]
|
||||
[import example/limitations_private_method.cpp]
|
||||
[import example/limitations_comma_in_macro.cpp]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue