unit_test_main.h File Reference


Detailed Description

Unit test framework: main function.


Functions

static bool begins_with (const char *str, const char *beginning)
static void set_log_levels_from_cmd (int argc, char *argv[])
void summary (int failed)
 Prints the summary of the unit test.
void run (int argc, char **argv)
 Configures and runs unit tests.

Variables

int log_level = 2
 Log level.
int status = 0
 holds current unit test status value.
std::list< TestCaseDescriptor * > test_cases
 A global list of all test cases.
SetupDescriptorsetup_descriptor = NULL
 A setup function.
TeardownDescriptorteardown_descriptor = NULL
 A global teardown descriptor.


Function Documentation

static bool begins_with ( const char *  str,
const char *  beginning 
) [static]

static void set_log_levels_from_cmd ( int  argc,
char *  argv[] 
) [static]

void summary ( int  failed  ) 

Prints the summary of the unit test.

void run ( int  argc,
char **  argv 
)

Configures and runs unit tests.


Variable Documentation

int log_level = 2

Log level.

int status = 0

holds current unit test status value.

0 is okay, non-zero value means failure.

std::list<TestCaseDescriptor*> test_cases

A global list of all test cases.

SetupDescriptor* setup_descriptor = NULL

A setup function.

TeardownDescriptor* teardown_descriptor = NULL

A global teardown descriptor.


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

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