sourcehook/test/testbail2.cpp
author Scott Ehlert <ds@alliedmods.net>
Tue Sep 16 04:41:32 2008 -0500 (2008-09-16)
changeset 533 591b88a78e35
parent 324 257f0837a885
permissions -rw-r--r--
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
     1 // TESTBAIL
     2 //  Different compilation unit
     3 
     4 #include "sourcehook.h"
     5 #include "sourcehook_test.h"
     6 #include "testbail.h"
     7 
     8 
     9 int EatYams_Handler2(int a)
    10 {
    11 	ADD_STATE(State_EatYams_Handler2_Called(a));
    12 	RETURN_META_VALUE_NEWPARAMS(MRES_OVERRIDE, 6, &IGaben::EatYams, (0xBEEF));
    13 }
    14 
    15 int EatYams_Handler3(int a)
    16 {
    17 	ADD_STATE(State_EatYams_Handler3_Called(a));
    18 	RETURN_META_VALUE(MRES_IGNORED, 0);
    19 }
    20 
    21 namespace N_TestBail
    22 {
    23 	bool TestBail2(std::string &error)
    24 	{
    25 		g_PLID = 2;
    26 
    27 		SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler2), false);
    28 		SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler3), false);
    29 
    30 		int ret = g_Gabgab->EatYams(0xDEAD);
    31 
    32 		CHECK_COND(ret == 6, "Part 2.1");
    33 
    34 		return true;
    35 	}
    36 }