Fixed tags for mmsource-central
mmsource-1.00-RC1 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:41:34 2006 UTC
mmsource-1.00-RC2 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:35:20 2006 UTC
mmsource-1.00 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:30:40 2006 UTC
mmsource-1.1 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:25:09 2006 UTC
mmsource-1.1.1 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:22:23 2006 UTC
mmsource-1.1.2 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:14:00 2006 UTC
mmsource-1.2 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:10:47 2006 UTC
mmsource-1.2.1 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 08:01:35 2006 UTC
mmsource-1.2.2 - Not tagged originally, but eventually done by Scott Ehlert <
[email protected]> on Wed Jul 19 07:57:26 2006 UTC
mmsource-1.2.3 - Not tagged originally, but eventually done by David Anderson <
[email protected]> on Wed Jul 12 17:33:59 2006 UTC
mmsource-1.3 - Originally tagged by Scott Ehlert <
[email protected]> on Thu Aug 17 03:19:55 2006 UTC
mmsource-1.3a - Originally tagged by Scott Ehlert <
[email protected]> on Wed Sep 6 07:17:37 2006 UTC
mmsource-1.3d - Originally tagged by Scott Ehlert <
[email protected]> on Fri Feb 2 05:30:56 2007 UTC
mmsource-1.4 - Originally tagged by Scott Ehlert <
[email protected]> on Sat Apr 7 05:00:28 2007 UTC
mmsource-1.6.0 - Originally tagged by David Anderson <
[email protected]> on Mon Feb 18 23:31:29 2008 UTC
mmsource-1.6.1 - Originally tagged by David Anderson <
[email protected]> on Mon Feb 25 17:15:44 2008 UTC
mmsource-1.6.2 - Originally tagged by David Anderson <
[email protected]> on Sat Jul 26 05:04:35 2008 UTC
2 #include "sourcehook.h"
3 #include "sourcehook_test.h"
4 #include "testevents.h"
6 // This should probably be done the other way round!
8 #define _snprintf snprintf
13 SourceHook::ISourceHook *g_SHPtr;
14 SourceHook::Plugin g_PLID;
16 unsigned int g_callcount[10];
21 VMultiTest(unsigned int index) : m_idx(index)
25 virtual void HookTarget()
30 g_callcount[this->m_idx]++;
38 VMultiTest *pv = META_IFACEPTR(VMultiTest);
42 SH_DECL_HOOK0_void(VMultiTest, HookTarget, SH_NOATTRIB, false);
45 bool TestMulti(std::string &error)
50 VMultiTest **pv = new VMultiTest *[10];
51 for (unsigned int i=0; i<10; i++)
52 pv[i] = new VMultiTest(i);
55 for (unsigned int i=0; i<10; i++)
56 SH_ADD_HOOK(VMultiTest, HookTarget, pv[i], SH_STATIC(HookFunction), false);
60 if (g_callcount[0] != 1)
62 error.assign("g_callcount[0] != 0");
66 for (unsigned int i=1; i<10; i++)
70 error.assign("g_callcount[n] != 0");
75 SH_REMOVE_HOOK(VMultiTest, HookTarget, pv[0], SH_STATIC(HookFunction), false);
77 for (unsigned int i=1; i<10; i++)
80 if (g_callcount[0] != 1)
82 error.assign("g_callcount[0] != 0");
86 for (unsigned int i=1; i<10; i++)
88 if (g_callcount[i] != 1)
91 _snprintf(err, sizeof(err)-1, "g_callcount[%d] != 1", i);
97 for (unsigned int i=0; i<10; i++)
99 SH_REMOVE_HOOK(VMultiTest, HookTarget, pv[1], SH_STATIC(HookFunction), false);