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@627 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
48f577182e
commit
2810694971
2 changed files with 10 additions and 7 deletions
|
|
@ -153,6 +153,11 @@ namespace detail
|
||||||
{} \
|
{} \
|
||||||
template< typename Actual > \
|
template< typename Actual > \
|
||||||
bool operator()( const Actual& actual ) const \
|
bool operator()( const Actual& actual ) const \
|
||||||
|
{ \
|
||||||
|
return test( actual, boost::unwrap_ref( expected_ ) ); \
|
||||||
|
} \
|
||||||
|
template< typename Actual, typename T > \
|
||||||
|
bool test( const Actual& actual, const T& expected ) const \
|
||||||
{ \
|
{ \
|
||||||
return Expr; \
|
return Expr; \
|
||||||
} \
|
} \
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,11 @@ namespace mock
|
||||||
MOCK_UNARY_CONSTRAINT( negate, ! actual )
|
MOCK_UNARY_CONSTRAINT( negate, ! actual )
|
||||||
MOCK_UNARY_CONSTRAINT( evaluate, actual() )
|
MOCK_UNARY_CONSTRAINT( evaluate, actual() )
|
||||||
|
|
||||||
MOCK_BINARY_CONSTRAINT( equal, actual == boost::unwrap_ref( expected_ ) )
|
MOCK_BINARY_CONSTRAINT( equal, actual == expected )
|
||||||
MOCK_BINARY_CONSTRAINT( less, actual < boost::unwrap_ref( expected_ ) )
|
MOCK_BINARY_CONSTRAINT( less, actual < expected )
|
||||||
MOCK_BINARY_CONSTRAINT( greater, actual > boost::unwrap_ref( expected_ ) )
|
MOCK_BINARY_CONSTRAINT( greater, actual > expected )
|
||||||
MOCK_BINARY_CONSTRAINT(
|
MOCK_BINARY_CONSTRAINT( less_equal, actual <= expected )
|
||||||
less_equal, actual <= boost::unwrap_ref( expected_ ) )
|
MOCK_BINARY_CONSTRAINT( greater_equal, actual >= expected )
|
||||||
MOCK_BINARY_CONSTRAINT(
|
|
||||||
greater_equal, actual >= boost::unwrap_ref( expected_ ) )
|
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue