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_Main.h"
#include "UT_NonCopyable.h"
#include "UT_StopWatch.h"
#include "UT_WorkArgs.h"
#include "UT_WorkBuffer.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)
 
#define TEST_UNIT_MAIN()
 

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 153 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;
virtual void addTest(const char *name, UT_Functor< bool > &callback)=0
GLuint const GLchar * name
Definition: glcorearb.h:786
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 177 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;
virtual void addTest(const char *name, UT_Functor< bool > &callback)=0
GLuint const GLchar * name
Definition: glcorearb.h:786
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 160 of file UT_TestManager.h.

#define TEST_UNIT_MAIN ( )
Value:
int theMain(int argc, char *argv[]) \
{ \
/*Ensure we reset the task scheduler to avoid hangning on exit in \
* Windows.*/ \
return UT_TestManager::get().run(argc, argv); \
} \
int theMain(int argc, char *argv[])
Definition: cvexsample.C:148
static UT_TestManager & get()
Access the global test manager.
#define UT_MAIN(THE_MAIN)
Definition: UT_Main.h:62
virtual int run(int argc, char *argv[])=0
Called by main() to run the tests. Returns the number of test failures.
static void resetNumProcessors()

Definition at line 193 of file UT_TestManager.h.