Renamed mock::constraint to mock::call

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@181 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2011-01-10 22:19:45 +00:00
parent 403e640927
commit defa340505
2 changed files with 13 additions and 0 deletions

View file

@ -177,6 +177,12 @@ namespace detail
{
return detail::assign< T >( t );
}
template< typename T >
constraint< T > call( T t )
{
return t;
}
}
#endif // #ifndef MOCK_CONSTRAINTS_HPP_INCLUDED

View file

@ -7,6 +7,7 @@
//
#include <turtle/constraints.hpp>
#include <turtle/operators.hpp>
#include <boost/test/auto_unit_test.hpp>
#define BOOST_LIB_NAME boost_unit_test_framework
@ -165,6 +166,12 @@ namespace
}
}
BOOST_AUTO_TEST_CASE( call )
{
BOOST_CHECK( mock::call( &return_true ).f_() );
BOOST_CHECK( ! mock::call( &return_false ).f_() );
}
BOOST_AUTO_TEST_CASE( evaluate )
{
BOOST_CHECK( mock::evaluate.f_( &return_true ) );