mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
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:
parent
403e640927
commit
defa340505
2 changed files with 13 additions and 0 deletions
|
|
@ -177,6 +177,12 @@ namespace detail
|
||||||
{
|
{
|
||||||
return detail::assign< T >( t );
|
return detail::assign< T >( t );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
constraint< T > call( T t )
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // #ifndef MOCK_CONSTRAINTS_HPP_INCLUDED
|
#endif // #ifndef MOCK_CONSTRAINTS_HPP_INCLUDED
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <turtle/constraints.hpp>
|
#include <turtle/constraints.hpp>
|
||||||
|
#include <turtle/operators.hpp>
|
||||||
|
|
||||||
#include <boost/test/auto_unit_test.hpp>
|
#include <boost/test/auto_unit_test.hpp>
|
||||||
#define BOOST_LIB_NAME boost_unit_test_framework
|
#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_AUTO_TEST_CASE( evaluate )
|
||||||
{
|
{
|
||||||
BOOST_CHECK( mock::evaluate.f_( &return_true ) );
|
BOOST_CHECK( mock::evaluate.f_( &return_true ) );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue