HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_TestManager.h File Reference
#include "UT_API.h"
#include "UT_Functor.h"
#include "UT_StopWatch.h"
#include "UT_WorkBuffer.h"
#include "UT_WorkArgs.h"
#include <SYS/SYS_Types.h>
+ Include dependency graph for UT_TestManager.h:

Go to the source code of this file.

Classes

class  UT_TestManager
 
class  UT_TestUnit
 Status maintainer used to run a test. More...
 

Macros

#define TEST_LOGRESULT(NAME, SUCCESS, TIME)   UT_TestManager::get().logResult(NAME, SUCCESS, TIME)
 Use this define to log information into the result table. More...
 
#define TEST_REGISTER_FN(name, method)
 
#define TEST_REGISTER(name, classname, method)
 

Macro Definition Documentation

#define TEST_LOGRESULT (   NAME,
  SUCCESS,
  TIME 
)    UT_TestManager::get().logResult(NAME, SUCCESS, TIME)

Use this define to log information into the result table.

Definition at line 149 of file UT_TestManager.h.

#define TEST_REGISTER (   name,
  classname,
  method 
)
Value:
class classname##method##Registrar \
{ \
public: \
classname##method##Registrar() \
{ \
UT_Functor<bool> callback(&myTest, \
&classname::method); \
} \
private: \
classname myTest; \
}; \
static classname##method##Registrar \
the##classname##method##Registrar;
GLuint const GLchar * name
Definition: glew.h:1814
virtual void addTest(const char *name, UT_Functor< bool > &callback)=0
static UT_TestManager & get()
Access the global test manager.

Use this macro after your test class is declared. It will create a static instance of your class that then registers your 'bool classname::method()' with the test manager. Your method should return true if the test succeeded, false otherwise. The name is the label that will be used for invoking this specific test.

Definition at line 173 of file UT_TestManager.h.

#define TEST_REGISTER_FN (   name,
  method 
)
Value:
class method##Registrar \
{ \
public: \
method##Registrar() \
{ \
UT_Functor<bool> callback(&method); \
} \
}; \
static method##Registrar the##method##Registrar;
GLuint const GLchar * name
Definition: glew.h:1814
virtual void addTest(const char *name, UT_Functor< bool > &callback)=0
static UT_TestManager & get()
Access the global test manager.

Use this macro after your test function is declared. It will register your method with the test manager. Your method should return true if the test succeeded, false otherwise. The name is the label that will be used for invoking this specific test.

Definition at line 156 of file UT_TestManager.h.