[B]asic module for [unit] program testing:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes | Friends
TestCaseFailure Class Reference

Private class to hold test cases that didn´t succeed. More...

#include <BUnit.h>

List of all members.

Public Member Functions

 ~TestCaseFailure ()
 Destructor.
 TestCaseFailure (const TestCaseFailure &o)
 Copy constructor.
void operator= (TestCaseFailure &o)
 Copy operator used to insert into contanier.

Private Member Functions

 TestCaseFailure ()
 Default constructor.
 TestCaseFailure (const char *fname, int line, const char *label, bool destroy)
 Private constructor that can set m_label to true.

Private Attributes

const char * m_fname
 Name of the file where the failure was produced.
int m_lineno
 Line number in the file where the failure was produced.
const char * m_label
 Descriptive message for the failure.
bool m_destroy_label
 Holds "true" if the destructor should return the dynamic memory for m_label.

Friends

class TestCase
 Test case.
template<class TestCase >
void do_toXML (const TestCase *tc, std::basic_ostringstream< char > &ost)
 Adds to ost the string of al unsuccessful test from *tc in XML format.
template<class TestCase >
void do_toString (const TestCase *tc, std::basic_ostringstream< char > &ost)
 Adds to ost the string of al unsuccessful test from *tc.

Detailed Description

Private class to hold test cases that didn´t succeed.

Definition at line 68 of file BUnit.h.


Constructor & Destructor Documentation

TestCaseFailure::TestCaseFailure ( ) [inline, private]

Default constructor.

Definition at line 75 of file BUnit.h.

TestCaseFailure::TestCaseFailure ( const char *  fname,
int  line,
const char *  label,
bool  destroy 
) [inline, private]

Private constructor that can set m_label to true.

Definition at line 78 of file BUnit.h.

Destructor.

Definition at line 82 of file BUnit.h.

Copy constructor.

Definition at line 83 of file BUnit.h.


Member Function Documentation

void TestCaseFailure::operator= ( TestCaseFailure o) [inline]

Copy operator used to insert into contanier.

Definition at line 90 of file BUnit.h.


Friends And Related Function Documentation

friend class TestCase [friend]

Test case.

Definition at line 105 of file BUnit.h.

template<class TestCase >
void do_toXML ( const TestCase tc,
std::basic_ostringstream< char > &  ost 
) [friend]

Adds to ost the string of al unsuccessful test from *tc in XML format.

Definition at line 1097 of file BUnit.h.

template<class TestCase >
void do_toString ( const TestCase tc,
std::basic_ostringstream< char > &  ost 
) [friend]

Adds to ost the string of al unsuccessful test from *tc.

Definition at line 1050 of file BUnit.h.


Member Data Documentation

const char * TestCaseFailure::m_fname [private]

Name of the file where the failure was produced.

Definition at line 70 of file BUnit.h.

Line number in the file where the failure was produced.

Definition at line 71 of file BUnit.h.

const char * TestCaseFailure::m_label [private]

Descriptive message for the failure.

Definition at line 72 of file BUnit.h.

Holds "true" if the destructor should return the dynamic memory for m_label.

Definition at line 73 of file BUnit.h.


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