Open xpac27 opened 8 years ago
Given the following classes:
class A { public: virtual ~A() {} template<typename T> void foo() {} }; class B {};
The following does compile correctly:
Mock<A> a; Fake(Method(a, foo<B>));
But when ran the test executable stops because of EXC_BAD_ACCESS:
* frame #0: 0x000000010010bea7 tests` fakeit::DynamicProxy<playercommunity::command::Command>::isBinded(unsigned int) [inlined] std::__1::shared_ptr<fakeit::Destructible>::shared_ptr(this=0x00007fff5fbfc5a8, __r=0x00000001037d17d0) + 4 at memory:4250 frame #1: 0x000000010010bea3 tests` fakeit::DynamicProxy<playercommunity::command::Command>::isBinded(unsigned int) [inlined] std::__1::shared_ptr<fakeit::Destructible>::shared_ptr(this=0x00007fff5fbfc5a8, __r=0x00000001037d17d0) + 16 at memory:4252 frame #2: 0x000000010010be93 tests` fakeit::DynamicProxy<playercommunity::command::Command>::isBinded(this=0x00007fff5fbfd668, offset=2281792) + 67 at fakeit.hpp:16449
ect... up to the line where I fake method foo. Isn't faking templated method supported? :(
AFAIK only virtual methods can be faked. Template methods cannot be virtual, so I guess the answer is no.
Hum... Yes, makes sense.
Given the following classes:
The following does compile correctly:
But when ran the test executable stops because of EXC_BAD_ACCESS:
ect... up to the line where I fake method foo. Isn't faking templated method supported? :(