Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Test_case Class Reference

A Test_case is a set of one or more unit tests, usually responsible for testing a single class. More...

#include <test.h>

List of all members.

Public Member Functions

virtual void init ()
virtual void deinit ()
bool get_success ()
void set_success (bool successful)

Public Attributes

char * test_name
char * check_name

Protected Attributes

bool success


Detailed Description

A Test_case is a set of one or more unit tests, usually responsible for testing a single class.

To implement a test case, just make a class that derives from Test_case, and then add one or more member test functions to it. Put any common setup code in the init() function, and add any common tear-down code to the deinit() function. A new instance of Test_case is created for the invocation of each test.


Member Function Documentation

virtual void Test_case::deinit  )  [inline, virtual]
 

Perform tear-down for a single test within this test case.

bool Test_case::get_success  )  [inline]
 

virtual void Test_case::init  )  [inline, virtual]
 

Perform setup for a single test within this test case.

void Test_case::set_success bool  successful  )  [inline]
 


Member Data Documentation

char* Test_case::check_name
 

name of failed check, if any

bool Test_case::success [protected]
 

whether the test run succeeded

char* Test_case::test_name
 

test name run in this test case


The documentation for this class was generated from the following file:

Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman