| author | Pavol Marko <pavolmarko@gmail.com> |
| Fri May 27 21:39:30 2005 +0000 (2005-05-27) | |
| changeset 75 | 8d8efeb2ecc8 |
| child 121 | 158b860440c0 |
| permissions | -rw-r--r-- |
1 // TESTBAIL
2 // Test for a bug Bail has found
4 #include "testbail.h"
6 void *___testbail_gabgab;
8 bool TestBail(std::string &error)
9 {
10 SourceHook::CSourceHookImpl g_SHImpl;
11 g_SHPtr = &g_SHImpl;
12 g_PLID = 1;
14 g_Gabgab = new IGaben;
15 ___testbail_gabgab = (void*)g_Gabgab;
17 g_Gabgab->EatYams();
19 SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams0_Handler, false);
21 g_Gabgab->EatYams();
23 ___TestBail2();
25 g_Gabgab->EatYams();
27 SH_REMOVE_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams0_Handler, false);
29 g_Gabgab->EatYams();
31 delete g_Gabgab;
33 // If it didn't crash, it's ok
35 return true;
36 }