mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Refactoring
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@722 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
c91d425d87
commit
0e586516c8
2 changed files with 12 additions and 9 deletions
|
|
@ -53,6 +53,7 @@ namespace detail
|
|||
{
|
||||
BOOST_PP_REPEAT(MOCK_NUM_ARGS,
|
||||
MOCK_EXPECTATION_TYPEDEF, _)
|
||||
|
||||
public:
|
||||
expectation()
|
||||
: BOOST_PP_REPEAT(MOCK_NUM_ARGS,
|
||||
|
|
@ -62,6 +63,14 @@ namespace detail
|
|||
, file_( "unknown location" )
|
||||
, line_( 0 )
|
||||
{}
|
||||
expectation( const char* file, int line )
|
||||
: BOOST_PP_REPEAT(MOCK_NUM_ARGS,
|
||||
MOCK_EXPECTATION_INITIALIZE, _)
|
||||
BOOST_PP_COMMA_IF(MOCK_NUM_ARGS)
|
||||
i_( boost::make_shared< unlimited >() )
|
||||
, file_( file )
|
||||
, line_( line )
|
||||
{}
|
||||
|
||||
~expectation()
|
||||
{
|
||||
|
|
@ -117,12 +126,6 @@ namespace detail
|
|||
BOOST_PP_REPEAT(MOCK_MAX_SEQUENCES,
|
||||
MOCK_EXPECTATION_IN, _)
|
||||
|
||||
void set_location( const char* file, int line )
|
||||
{
|
||||
file_ = file;
|
||||
line_ = line;
|
||||
}
|
||||
|
||||
bool verify() const
|
||||
{
|
||||
return i_->verify();
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ namespace detail
|
|||
|
||||
expectation_type& expect( const char* file, int line )
|
||||
{
|
||||
expectation_type& e = expect();
|
||||
e.set_location( file, line );
|
||||
return e;
|
||||
expectations_.push_back( expectation_type( file, line ) );
|
||||
valid_ = true;
|
||||
return expectations_.back();
|
||||
}
|
||||
expectation_type& expect()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue