1.1 --- a/sourcehook/test/testbail2.cpp Thu Dec 22 21:00:54 2005 +0000
1.2 +++ b/sourcehook/test/testbail2.cpp Fri Dec 23 11:58:11 2005 +0000
1.3 @@ -1,23 +1,25 @@
1.4 // TESTBAIL
1.5 // Different compilation unit
1.6
1.7 +#include "sourcehook.h"
1.8 +#include "sourcehook_test.h"
1.9 #include "testbail.h"
1.10
1.11 -void ___TestBail2()
1.12 +// :TODO: Test new-old proto system compa
1.13 +
1.14 +bool ___TestBail2(std::string &error)
1.15 {
1.16 - SourceHook::CSourceHookImpl g_SHImpl;
1.17 - g_SHPtr = &g_SHImpl;
1.18 + g_SHPtr = ___testbail_shptr;
1.19 g_PLID = 2;
1.20
1.21 g_Gabgab = (IGaben*)___testbail_gabgab;
1.22
1.23 - g_Gabgab->EatYams();
1.24 -
1.25 - SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams0_Handler, false);
1.26 + SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, ___testbail_EatYams_Handler2, false);
1.27 + SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, ___testbail_EatYams_Handler3, false);
1.28
1.29 - g_Gabgab->EatYams();
1.30 + int ret = g_Gabgab->EatYams(0xDEAD);
1.31
1.32 - SH_REMOVE_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams0_Handler, false);
1.33 -
1.34 - g_Gabgab->EatYams();
1.35 + CHECK_COND(ret == 6, "Part 2.1");
1.36 +
1.37 + return true;
1.38 }