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@171 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
f3173c7770
commit
0377bccad2
2 changed files with 26 additions and 34 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include <turtle/mock.hpp>
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
namespace
|
||||
|
|
@ -293,3 +294,19 @@ BOOST_AUTO_TEST_CASE( failed_sequence_in_mocked_destructor_does_not_throw )
|
|||
m.my_method();
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
MOCK_CLASS( boost_optional )
|
||||
{
|
||||
MOCK_METHOD_EXT( method, 0, boost::optional< my_observer& >(), method )
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( boost_optional_on_base_class_reference_as_return_type )
|
||||
{
|
||||
boost_optional b;
|
||||
my_mock_observer o;
|
||||
MOCK_EXPECT( b, method ).once().returns( boost::ref( o ) );
|
||||
b.method();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue