|
API Documentation
|
|
|
168 static const
char NK_DEBUG_STATIC_EMPTY_CHAR [] = "" ;
178 template <typename T, const
char* T_NAME>
213 #define NK_TEST_CLASS(name) \
214 static const char NK_DEBUG_STATIC_CHAR_##name [] = #name ; \
215 class name : public nkDebug::RegisteredTestClass<name, NK_DEBUG_STATIC_CHAR_##name>
217 #define NK_TEST_CLASS_NS(ns, name) \
220 static const char NK_DEBUG_STATIC_CHAR_##name [] = #ns "::" #name ; \
221 class name : public nkDebug::RegisteredTestClass<name, NK_DEBUG_STATIC_CHAR_##name> \
223 #define NK_TEST_CLASS_NS_END }
225 #define NK_TEST_FUNCTION(name) \
226 static void caller_##name () \
231 inline static const std::function<void ()>& registered_##name = _registered->_testFunctions.registerFunction(#name, &caller_##name) ; \
233 static void name () \
235 #define NK_TEST_CLASS_INIT \
236 static bool classInitFunctionCaller () \
238 return classInitFunction() ; \
241 inline static const bool classInitRegistered = _registered->setClassInitFunction(classInitFunctionCaller) ; \
243 static bool classInitFunction () \
245 #define NK_TEST_CLASS_SHUTDOWN \
246 static void classShutdownFunctionCaller () \
248 classShutdownFunction() ; \
251 inline static const bool classShutdownRegistered = _registered->setClassShutdownFunction(classShutdownFunctionCaller) ; \
253 static void classShutdownFunction () \
255 #define NK_TEST_FUNCTION_INIT \
256 static bool testFunctionInitFunctionCaller () \
258 return testFunctionInitFunction() ; \
261 inline static const bool testFunctionInitRegistered = _registered->setTestFunctionInitFunction(testFunctionInitFunctionCaller) ; \
263 static bool testFunctionInitFunction () \
265 #define NK_TEST_FUNCTION_SHUTDOWN \
266 static void testFunctionShutdownFunctionCaller () \
268 testFunctionShutdownFunction() ; \
271 inline static const bool testFunctionShutdownRegistered = _registered->setTestFunctionShutdownFunction(testFunctionShutdownFunctionCaller) ; \
273 static void testFunctionShutdownFunction () \
Holds informations about a registered test class.
Definition: TestClass.h:180
std::function< void()> getFunctionShutdownFunction() const
A function set holding testing functions.
Definition: FunctionSet.h:14
void execute(const TestRunParameters ¶meters) const
bool setTestFunctionInitFunction(std::function< bool()> func)
std::function< void()> getClassShutdownFunction() const
void setName(nkMemory::StringView value)
bool setClassShutdownFunction(std::function< void()> func)
static TestClass * registerTestClass(std::function< TestClass *()> factoryFunction)
bool setTestFunctionShutdownFunction(std::function< void()> func)
static TestClass * factoryFunc()
Definition: TestClass.h:200
std::function< bool()> getClassInitFunction() const
nkMemory::StringView getName() const
Parameters allowing to drive a test run sequence.
Definition: TestRunParameters.h:12
FunctionSet & getFunctionSet()
RegisteredTestClass()
Definition: TestClass.h:188
std::function< bool()> getFunctionInitFunction() const
Encompasses all API of component NilkinsDebug.
Definition: LogManager.h:7
The test enabling class, allowing registration within the UnitTester.
Definition: TestClass.h:62
bool setClassInitFunction(std::function< bool()> func)
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7