diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-02-07 18:21:01 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-02-07 18:21:01 +0100 |
commit | 5b6ae9c5427b32f5bacba592fc08e1f70009aee4 (patch) | |
tree | 67e49b1802bcb8c2b9c7de9b2cd5c165f846c5fc /include | |
parent | 4ed0292914ca78aa419aab3add5b113c26b81a12 (diff) |
Only compile the testsuite if INSPIRCD_ENABLE_TESTSUITE is defined
Diffstat (limited to 'include')
-rw-r--r-- | include/configreader.h | 5 | ||||
-rw-r--r-- | include/modules.h | 4 | ||||
-rw-r--r-- | include/testsuite.h | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/configreader.h b/include/configreader.h index 7bc6c1bcb..e10f361d7 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -151,11 +151,6 @@ struct CommandLineConf */ bool writelog; - /** True if we have been told to run the testsuite from the commandline, - * rather than entering the mainloop. - */ - bool TestSuite; - /** Saved argc from startup */ int argc; diff --git a/include/modules.h b/include/modules.h index f6a984bcd..2abed2935 100644 --- a/include/modules.h +++ b/include/modules.h @@ -264,7 +264,7 @@ enum Implementation I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass, - I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, + I_OnText, I_OnPassCompare, I_OnNamesListItem, I_OnNumeric, I_OnPreRehash, I_OnModuleRehash, I_OnSendWhoLine, I_OnChangeIdent, I_OnSetUserIP, I_END }; @@ -1034,10 +1034,12 @@ class CoreExport Module : public classbase, public usecountbase */ virtual ModResult OnSetConnectClass(LocalUser* user, ConnectClass* myclass); +#ifdef INSPIRCD_ENABLE_TESTSUITE /** Add test suite hooks here. These are used for testing functionality of a module * via the --testsuite debugging parameter. */ virtual void OnRunTestSuite(); +#endif /** Called for every item in a NAMES list, so that modules may reformat portions of it as they see fit. * For example NAMESX, channel mode +u and +I, and UHNAMES. If the nick is set to an empty string by any diff --git a/include/testsuite.h b/include/testsuite.h index 7f0b2236a..c760513f8 100644 --- a/include/testsuite.h +++ b/include/testsuite.h @@ -18,6 +18,8 @@ #pragma once +#ifdef INSPIRCD_ENABLE_TESTSUITE + class TestSuite { public: @@ -30,3 +32,5 @@ class TestSuite bool DoSpaceSepStreamTests(); bool DoGenerateUIDTests(); }; + +#endif |