logog
logger optimized for games
unittest.hpp File Reference
#include <iostream>
#include <string>

Go to the source code of this file.

Classes

class  TestSignup
 
class  UnitTest
 

Namespaces

 logog
 [Thread]
 

Macros

#define UNITTEST(x)
 

Typedefs

typedef const char * TestNameType
 
typedef LOGOG_LIST< UnitTest * > TestRegistryType
 

Functions

TestRegistryType & LogogTestRegistry ()
 
int RunAllTests ()
 
void ShutdownTests ()
 

Detailed Description

Unit testing interface; may be used for other programs as well.

Macro Definition Documentation

#define UNITTEST (   x)
Value:
class x : public UnitTest { \
public: \
x( TestNameType name ) : \
UnitTest( name ) \
{} \
virtual ~x() {}; \
virtual int RunTest(); \
}; \
x __LogogTestInstance_ ## x ( #x ); \
int x::RunTest()
const char * TestNameType
Definition: unittest.hpp:69

This should be the function prefix for a unit test. It defines a new class for the test inherited from UnitTest. It instances a member of the class at run-time (before main() starts). Lastly it provides the function definition for the actual test class.