Added documentation in the limitations section about why non-virtual methods cannot be mocked

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@693 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-10-03 07:59:17 +00:00
parent 7c3714169d
commit f77cac0103
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp>
//[ limitations_non_virtual_method_problem
class base
{
public:
void method() // the method is not virtual
{}
};
//]
//[ limitations_non_virtual_method_problem_2
MOCK_BASE_CLASS( mock_base, base )
{
MOCK_METHOD( method, 0 )
};
//]