UT/UT_TestManager.h File Reference

#include "UT_API.h"
#include "UT_Functor.h"

Go to the source code of this file.

Classes

class  UT_TestManager

Defines

#define TEST_REGISTER_FN(name, method)
#define TEST_REGISTER(name, classname, method)


Define Documentation

#define TEST_REGISTER ( name,
classname,
method   ) 

Value:

class classname##method##Registrar                          \
            {                                                           \
                public:                                                 \
                    classname##method##Registrar()                      \
                    {                                                   \
                        UT_Functor<bool> callback(&myTest,              \
                                                  &classname::method);  \
                        UT_TestManager::get().addTest(name, callback);  \
                    }                                                   \
                private:                                                \
                    classname   myTest;                                 \
            };                                                          \
            static classname##method##Registrar                         \
                                    the##classname##method##Registrar;
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 78 of file UT_TestManager.h.

#define TEST_REGISTER_FN ( name,
method   ) 

Value:

class method##Registrar                                     \
            {                                                           \
                public:                                                 \
                    method##Registrar()                                 \
                    {                                                   \
                        UT_Functor<bool> callback(&method);             \
                        UT_TestManager::get().addTest(name, callback);  \
                    }                                                   \
            };                                                          \
            static method##Registrar    the##method##Registrar;
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 61 of file UT_TestManager.h.


Generated on Thu May 24 00:09:05 2012 for HDK by  doxygen 1.5.9