Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testcase.h File Reference

Go to the source code of this file.

Classes

class  mitsuba::TestCase
 Base class of all testcases. More...
 

Namespaces

 mitsuba
 

Macros

#define __MITSUBA_RENDER_TESTCASE_H_
 
#define EXECUTE_GUARDED(name)
 
#define MTS_BEGIN_TESTCASE()
 
#define MTS_DECLARE_TEST(name)   EXECUTE_GUARDED(name)
 
#define MTS_END_TESTCASE()
 
#define MTS_EXPORT_TESTCASE(name, descr)
 

Macro Definition Documentation

#define __MITSUBA_RENDER_TESTCASE_H_
#define EXECUTE_GUARDED (   name)
Value:
try { \
Log(EInfo, "Executing test \"%s\" ..", #name); \
m_executed++;\
name();\
m_succeeded++;\
} catch (std::exception &e) {\
Log(EInfo, "Testcase failed with error: %s", e.what());\
}
More relevant debug / information message.
Definition: formatter.h:31
#define Log(level, fmt,...)
Write a Log message to the console (to be used within subclasses of Object)
Definition: logger.h:35
#define MTS_BEGIN_TESTCASE ( )
Value:
int run(int argc, char **argv) {\
init(); \
Log(EInfo, "Executing testcase \"%s\" ..", getClass()->getName().c_str()); \
m_executed = m_succeeded = 0;
More relevant debug / information message.
Definition: formatter.h:31
#define Log(level, fmt,...)
Write a Log message to the console (to be used within subclasses of Object)
Definition: logger.h:35
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
#define MTS_DECLARE_TEST (   name)    EXECUTE_GUARDED(name)
#define MTS_END_TESTCASE ( )
Value:
shutdown();\
return m_executed - m_succeeded;\
}
#define MTS_EXPORT_TESTCASE (   name,
  descr 
)
Value:
MTS_IMPLEMENT_CLASS(name, false, TestCase) \
extern "C" { \
void MTS_EXPORT *CreateUtility() { \
return new name(); \
} \
const char MTS_EXPORT *GetDescription() { \
return descr; \
} \
}
#define MTS_IMPLEMENT_CLASS(name, abstract, super)
Creates basic RTTI support for a class.
Definition: class.h:180
#define MTS_EXPORT
Definition: platform.h:86