mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Removed support for directly mocking a protected member function
Taking a function pointer on a base member protected function is actually invalid.
This could work with a pointer on the derived class member function, that is &derived::method instead of &base::method however there is no way to pass the derived class from MOCK_BASE_CLASS to the mock::detail::base helper if template classes are to be supported.
Anyway the now documented workaround is simple enough and the same as for private member functions.
As a side note the changes from ed36823235 might not be needed any more…
This commit is contained in:
parent
caef00d2e3
commit
4455222a62
5 changed files with 22 additions and 23 deletions
|
|
@ -84,8 +84,8 @@ namespace
|
|||
class my_ambiguited_interface : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
virtual ~my_ambiguited_interface() {}
|
||||
|
||||
virtual ~my_ambiguited_interface()
|
||||
{}
|
||||
virtual void my_method() = 0;
|
||||
virtual void my_method( int ) = 0;
|
||||
};
|
||||
|
|
@ -110,8 +110,8 @@ namespace
|
|||
class my_const_ambiguited_interface : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
virtual ~my_const_ambiguited_interface() {}
|
||||
|
||||
virtual ~my_const_ambiguited_interface()
|
||||
{}
|
||||
virtual void my_method() = 0;
|
||||
virtual void my_method() const = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ namespace
|
|||
{
|
||||
virtual ~base()
|
||||
{}
|
||||
protected:
|
||||
|
||||
virtual void m1() = 0;
|
||||
};
|
||||
|
||||
|
|
@ -413,7 +413,7 @@ namespace
|
|||
{
|
||||
virtual ~base()
|
||||
{}
|
||||
protected:
|
||||
|
||||
virtual void m1() = 0;
|
||||
};
|
||||
|
||||
|
|
@ -444,7 +444,6 @@ namespace stdcall
|
|||
virtual ~base()
|
||||
{}
|
||||
|
||||
protected:
|
||||
virtual void MOCK_STDCALL m1() = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue