summaryrefslogtreecommitdiffstats
path: root/src/SelfTests.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-06-10 20:18:49 +0200
committerMattes D <github@xoft.cz>2016-06-18 13:12:10 +0200
commit36eefbf0f25c93ed30bcff9d7abbb8b8696964df (patch)
tree31a06620dfde39de250b4778c67658eaccfcdab3 /src/SelfTests.h
parentSelfTests: Fixed HTTPMessageParser tests for out-of-source builds. (diff)
downloadcuberite-36eefbf0f25c93ed30bcff9d7abbb8b8696964df.tar
cuberite-36eefbf0f25c93ed30bcff9d7abbb8b8696964df.tar.gz
cuberite-36eefbf0f25c93ed30bcff9d7abbb8b8696964df.tar.bz2
cuberite-36eefbf0f25c93ed30bcff9d7abbb8b8696964df.tar.lz
cuberite-36eefbf0f25c93ed30bcff9d7abbb8b8696964df.tar.xz
cuberite-36eefbf0f25c93ed30bcff9d7abbb8b8696964df.tar.zst
cuberite-36eefbf0f25c93ed30bcff9d7abbb8b8696964df.zip
Diffstat (limited to '')
-rw-r--r--src/SelfTests.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/SelfTests.h b/src/SelfTests.h
deleted file mode 100644
index 03a3b5faa..000000000
--- a/src/SelfTests.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-// SelfTests.h
-
-// Declares the cSelfTests class representing the singleton used for registering self-tests
-// This class is only declared if SELF_TEST macro is defined.
-
-
-
-
-
-#pragma once
-
-
-
-
-
-#ifdef SELF_TEST
- /** Singleton containing registered self-tests.
- Used to schedule self-tests to run after the logging framework is initialized (#2228). */
- class cSelfTests
- {
- public:
- /** Returns the singleton instance of this class. */
- static cSelfTests & Get(void);
-
- // typedef void (* SelfTestFunction)(void);
- typedef std::function<void(void)> SelfTestFunction;
-
- /** Registers a self-test to be executed once the logging framework is initialized. */
- static void Register(SelfTestFunction a_FnToExecute, const AString & a_TestName);
-
- /** Executes all the registered self-tests. */
- static void ExecuteAll(void);
-
- protected:
- typedef std::vector<std::pair<SelfTestFunction, AString>> SelfTestFunctions;
-
- /** Functions (registered self-tests) to call once the logging framework is initialized. */
- SelfTestFunctions m_SelfTests;
-
- /** If true, tests may be registered. Set to false once the tests are executed, to detect tests that are registered too late. */
- bool m_AllowRegistering;
-
-
- cSelfTests(void);
- };
-#endif // SELF_TEST
-
-
-
-