summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-21 15:59:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-21 15:59:57 +0000
commit54b2b600de7b6f74d387cb0db55375267572adde (patch)
tree3a3da00dccb4da5d000c55b12f87ae8294b59b9f /include
parentc3b8b80a334cb638424185f2767b7853f43537da (diff)
More test suite stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8976 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h5
-rw-r--r--include/modules.h7
-rw-r--r--include/testsuite.h9
3 files changed, 20 insertions, 1 deletions
diff --git a/include/configreader.h b/include/configreader.h
index e74895e8b..a5ae36c09 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -629,6 +629,11 @@ class CoreExport ServerConfig : public Extensible
*/
char sid[MAXBUF];
+ /** True if we have been told to run the testsuite from the commandline,
+ * rather than entering the mainloop.
+ */
+ bool TestSuite;
+
/** Construct a new ServerConfig
*/
ServerConfig(InspIRCd* Instance);
diff --git a/include/modules.h b/include/modules.h
index f19df390c..9498e239e 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -401,7 +401,7 @@ enum Implementation
I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnCancelAway, I_OnUserList,
I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect, I_OnBufferFlushed,
- I_OnText, I_OnReadConfig, I_OnDownloadFile, I_OnPassCompare,
+ I_OnText, I_OnReadConfig, I_OnDownloadFile, I_OnPassCompare, I_OnRunTestSuite,
I_END
};
@@ -1352,6 +1352,11 @@ class CoreExport Module : public Extensible
* @param user The user who's buffer is now empty.
*/
virtual void OnBufferFlushed(User* user);
+
+ /** Add test suite hooks here. These are used for testing functionality of a module
+ * via the --testsuite debugging parameter.
+ */
+ virtual void OnRunTestSuite();
};
diff --git a/include/testsuite.h b/include/testsuite.h
index 447e2b15e..b72e2b3a1 100644
--- a/include/testsuite.h
+++ b/include/testsuite.h
@@ -14,4 +14,13 @@
#ifndef __TESTSUITE_H__
#define __TESTSUITE_H__
+class InspIRCd;
+
+class TestSuite : public Extensible
+{
+ public:
+ TestSuite(InspIRCd* ServerInstance);
+ ~TestSuite();
+};
+
#endif