1.1 --- a/sourcehook/test/test3.cpp Sun Oct 07 23:00:38 2007 +0000
1.2 +++ b/sourcehook/test/test3.cpp Mon Oct 08 14:20:51 2007 +0000
1.3 @@ -65,6 +65,11 @@
1.4 {
1.5 ADD_STATE(State_Func3H_Called(META_IFACEPTR(void)));
1.6 }
1.7 +
1.8 + Derived *MyInstanceFactory()
1.9 + {
1.10 + return new Derived;
1.11 + }
1.12 }
1.13
1.14 bool TestThisPtrOffs(std::string &error)
1.15 @@ -72,11 +77,13 @@
1.16 GET_SHPTR(g_SHPtr);
1.17 g_PLID = 1337;
1.18
1.19 - Derived inst;
1.20 - Derived *pD = &inst;
1.21 + Derived *pD = MyInstanceFactory();
1.22 Base1 *pB1 = pD;
1.23 Base2 *pB2 = pD;
1.24
1.25 + CAutoPtrDestruction<Derived> apd(pD);
1.26 +
1.27 +
1.28 // It should be:
1.29 // pB1 = pD
1.30 // pB2 > pB1