CSCE 221-(507-509)
Programing Assignment 2
Overview MySTL Testing Todos
 All Classes Namespaces Files Functions Variables Typedefs Friends Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
test_class Class Referenceabstract

Test class for unit test framework. More...

Public Member Functions

 test_class ()
 Constructor. More...
 
virtual ~test_class ()
 Destructor. More...
 
bool run ()
 Run Unit test's setup, test, and teardown functions. More...
 

Protected Member Functions

virtual void setup ()
 Setup data to be tested. More...
 
virtual void test ()=0
 Test data. More...
 
virtual void tear_down ()
 Teardown data which was tested. More...
 
bool all_tests_passed () const
 
void assert_msg (bool b, std::string msg)
 Assert a unit test passes. More...
 

Private Attributes

bool fail = false
 Stores if any test case has failed. More...
 

Detailed Description

Test class for unit test framework.

Constructor & Destructor Documentation

test_class::test_class ( )

Constructor.

virtual test_class::~test_class ( )
virtual

Destructor.

Member Function Documentation

bool test_class::run ( )

Run Unit test's setup, test, and teardown functions.

Returns
Passed test or not
virtual void test_class::setup ( )
protectedvirtual

Setup data to be tested.

virtual void test_class::test ( )
protectedpure virtual

Test data.

Implemented in map_test.

virtual void test_class::tear_down ( )
protectedvirtual

Teardown data which was tested.

bool test_class::all_tests_passed ( ) const
protected
Returns
All asserts have passed
void test_class::assert_msg ( bool  b,
std::string  msg 
)
protected

Assert a unit test passes.

Parameters
bConditional for assert
msgMessage on fail

Member Data Documentation

bool test_class::fail = false
private

Stores if any test case has failed.


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