git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@758 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2014-11-23 10:54:05 +00:00
parent e85cf69f9f
commit 5eceba381a
2 changed files with 7 additions and 6 deletions

View file

@ -28,7 +28,7 @@
&& (*c##n##_)( a##n ) && (*c##n##_)( a##n )
#define MOCK_EXPECTATION_SERIALIZE(z, n, d) \ #define MOCK_EXPECTATION_SERIALIZE(z, n, d) \
BOOST_PP_IF(n, << ", " <<,) *m.c##n##_ BOOST_PP_IF(n, << ", " <<,) *e.c##n##_
#define MOCK_EXPECTATION_IN_ADD(z, n, d ) \ #define MOCK_EXPECTATION_IN_ADD(z, n, d ) \
s##n.impl_->add( this ); sequences_.push_back( s##n.impl_ ); s##n.impl_->add( this ); sequences_.push_back( s##n.impl_ );
@ -163,10 +163,10 @@ namespace detail
} }
friend std::ostream& operator<<( friend std::ostream& operator<<(
std::ostream& s, const expectation& m ) std::ostream& s, const expectation& e )
{ {
return s << (m.i_->exhausted() ? 'v' : '.') return s << (e.i_->exhausted() ? 'v' : '.')
<< ' ' << *m.i_ << ' ' << *e.i_
#ifndef MOCK_NUM_ARGS_0 #ifndef MOCK_NUM_ARGS_0
<< ".with( " << ".with( "
<< BOOST_PP_REPEAT(MOCK_NUM_ARGS, << BOOST_PP_REPEAT(MOCK_NUM_ARGS,

View file

@ -26,11 +26,12 @@ namespace detail
virtual bool operator()( Actual ) = 0; virtual bool operator()( Actual ) = 0;
friend std::ostream& operator<<( friend std::ostream& operator<<(
std::ostream& s, const matcher_base& c ) std::ostream& s, const matcher_base& m )
{ {
c.serialize( s ); m.serialize( s );
return s; return s;
} }
private: private:
virtual void serialize( std::ostream& ) const = 0; virtual void serialize( std::ostream& ) const = 0;
}; };