Refactoring

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@685 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-08-13 21:43:54 +00:00
parent 5366ebf3df
commit 34a4e00031
2 changed files with 9 additions and 8 deletions

View file

@ -10,8 +10,8 @@
#define MOCK_EXPECTATION_BASE_HPP_INCLUDED #define MOCK_EXPECTATION_BASE_HPP_INCLUDED
#include "../config.hpp" #include "../config.hpp"
#include "invocation.hpp"
#include "../sequence.hpp" #include "../sequence.hpp"
#include "invocation.hpp"
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
#include <vector> #include <vector>
@ -22,11 +22,6 @@ namespace detail
class expectation_base class expectation_base
{ {
public: public:
expectation_base()
: i_( boost::make_shared< unlimited >() )
, file_( "unknown location" )
, line_( 0 )
{}
void set_location( const char* file, int line ) void set_location( const char* file, int line )
{ {
file_ = file; file_ = file;
@ -66,6 +61,11 @@ namespace detail
} }
protected: protected:
expectation_base()
: i_( boost::make_shared< unlimited >() )
, file_( "unknown location" )
, line_( 0 )
{}
~expectation_base() ~expectation_base()
{ {
for( sequences_cit it = sequences_.begin(); for( sequences_cit it = sequences_.begin();

View file

@ -39,8 +39,9 @@ namespace detail
public: public:
typedef MOCK_ERROR_POLICY< R > error_type; typedef MOCK_ERROR_POLICY< R > error_type;
typedef expectation< R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) typedef expectation<
> expectation_type; R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) )
> expectation_type;
public: public:
function_impl() function_impl()