mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
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:
parent
7c3714169d
commit
f77cac0103
2 changed files with 36 additions and 0 deletions
19
build/boost/doc/example/limitations_non_virtual_method.cpp
Normal file
19
build/boost/doc/example/limitations_non_virtual_method.cpp
Normal 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 )
|
||||
};
|
||||
//]
|
||||
Loading…
Add table
Add a link
Reference in a new issue