mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Enhanced error message for ambiguous_mock_method
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@387 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
b2103f6947
commit
f6e0916dbd
1 changed files with 6 additions and 1 deletions
|
|
@ -25,6 +25,8 @@
|
||||||
#include <boost/mpl/pop_front.hpp>
|
#include <boost/mpl/pop_front.hpp>
|
||||||
#define BOOST_TYPEOF_SILENT
|
#define BOOST_TYPEOF_SILENT
|
||||||
#include <boost/typeof/typeof.hpp>
|
#include <boost/typeof/typeof.hpp>
|
||||||
|
#include <boost/utility/enable_if.hpp>
|
||||||
|
#include <boost/type_traits.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace mock
|
namespace mock
|
||||||
|
|
@ -87,6 +89,9 @@ namespace detail
|
||||||
typedef T base_type;
|
typedef T base_type;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
T& invalid_pointer_to_member( const T& t );
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MOCK_BASE_CLASS(T, I) \
|
#define MOCK_BASE_CLASS(T, I) \
|
||||||
|
|
@ -114,7 +119,7 @@ namespace detail
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MOCK_SIGNATURE(M) \
|
#define MOCK_SIGNATURE(M) \
|
||||||
mock::detail::signature< BOOST_TYPEOF(&base_type::M) >::type
|
mock::detail::signature< BOOST_TYPEOF( mock::invalid_pointer_to_member( &base_type::M ) ) >::type
|
||||||
|
|
||||||
#define MOCK_METHOD_STUB(M, n, S, t, c, tpn) \
|
#define MOCK_METHOD_STUB(M, n, S, t, c, tpn) \
|
||||||
MOCK_DECL(M, n, S, c, tpn) \
|
MOCK_DECL(M, n, S, c, tpn) \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue