unit_test.h File Reference


Detailed Description

Unit test framework.


Classes

class  Descriptor
 Container of a description of a test case, setup or teardown. More...
class  SetupDescriptor
 Container of a setup function description. More...
class  TeardownDescriptor
 Container of teardown function description. More...
class  TestCaseDescriptor
 Container of test case description. More...

Defines

#define LOG_DOMAIN   "test"
#define TEST(x)
 Defines the test case function and adds it to the global test case list.
#define XTEST(x)   static void x ()
 Defines the excluded test case function (not put to the global test case list).
#define SETUP(x)
 Defines the setup function.
#define TEARDOWN(x)
 Defines the teardown function.

Functions

std::ostream & operator<< (std::ostream &out, Descriptor *descriptor)

Variables

SetupDescriptorsetup_descriptor
 A setup function.
TeardownDescriptorteardown_descriptor
 A global teardown descriptor.
std::list< TestCaseDescriptor * > test_cases
 A global list of all test cases.


Define Documentation

#define LOG_DOMAIN   "test"

#define TEST (  ) 

Value:

static void x (); \
    TestCaseDescriptor test_case_descriptor_ ## x (&x, #x, __FILE__, __LINE__); \
    static void x ()
Defines the test case function and adds it to the global test case list.

#define XTEST (  )     static void x ()

Defines the excluded test case function (not put to the global test case list).

#define SETUP (  ) 

Value:

static void x (); \
    SetupDescriptor setup_descriptor_ ## x (&x, #x, __FILE__, __LINE__); \
    static void x ()
Defines the setup function.

#define TEARDOWN (  ) 

Value:

static void x (); \
    TeardownDescriptor teardown_descriptor_ ## x (&x, #x, __FILE__, __LINE__); \
    static void x ()
Defines the teardown function.


Function Documentation

std::ostream& operator<< ( std::ostream &  out,
Descriptor descriptor 
)


Variable Documentation

SetupDescriptor* setup_descriptor

A setup function.

TeardownDescriptor* teardown_descriptor

A global teardown descriptor.

std::list<TestCaseDescriptor*> test_cases

A global list of all test cases.


Genereated on Tue Mar 11 19:26:09 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.