tut logo

TUT: tut::test_result Struct Reference


tut::test_result Struct Reference

#include <tut_result.hpp>

Inheritance diagram for tut::test_result:

Inheritance graph
[legend]
Collaboration diagram for tut::test_result:

Collaboration graph
[legend]
List of all members.

Detailed Description

Return type of runned test/test group.

For test: contains result of test and, possible, message for failure or exception.

Definition at line 69 of file tut_result.hpp.


Public Types

enum  result_type {
  ok, fail, ex,
  warn, term, ex_ctor,
  rethrown, skipped, dummy
}

Public Member Functions

 test_result (const std::string &grp, int pos, const std::string &test_name, result_type res, const std::string &ex_typeid, const std::string &msg)
 test_result (const std::string &grp, int pos, const std::string &test_name, result_type res, const std::exception &ex)
 test_result (const std::string &grp, int pos, const std::string &test_name, result_type res)
 test_result ()
virtual ~test_result ()

Public Attributes

std::string exception_typeid
std::string group
std::string message
std::string name
result_type result
int test

Member Enumeration Documentation

enum tut::test_result::result_type

result of a test

Enumerator:
ok  test finished successfully
fail  test failed with ensure() or fail() methods
ex  test throwed an exceptions
warn  test finished successfully, but test destructor throwed
term  test forced test application to terminate abnormally
dummy 

Definition at line 89 of file tut_result.hpp.


Constructor & Destructor Documentation

tut::test_result::test_result (  )  [inline]

Default constructor.

Definition at line 113 of file tut_result.hpp.

tut::test_result::test_result ( const std::string &  grp,
int  pos,
const std::string &  test_name,
result_type  res 
) [inline]

Constructor.

Definition at line 126 of file tut_result.hpp.

tut::test_result::test_result ( const std::string &  grp,
int  pos,
const std::string &  test_name,
result_type  res,
const std::exception &  ex 
) [inline]

Constructor with exception.

Definition at line 140 of file tut_result.hpp.

tut::test_result::test_result ( const std::string &  grp,
int  pos,
const std::string &  test_name,
result_type  res,
const std::string &  ex_typeid,
const std::string &  msg 
) [inline]

Constructor with typeid.

Definition at line 154 of file tut_result.hpp.


Member Data Documentation

std::string tut::test_result::group

Test group name.

Definition at line 74 of file tut_result.hpp.

Referenced by tut::util::deserialize(), tut::util::serialize(), tut::xml_reporter::test_completed(), and tut::console_reporter::test_completed().

std::string tut::test_result::message

Exception message for failed test.

Definition at line 107 of file tut_result.hpp.

Referenced by tut::util::deserialize(), tut::test_group< Data, MaxTestsInGroup >::run_test_(), and tut::util::serialize().

std::string tut::test_result::name

Test name (optional)

Definition at line 84 of file tut_result.hpp.

Referenced by tut::test_group< Data, MaxTestsInGroup >::run_test_().

int tut::test_result::test

Test number in group.

Definition at line 79 of file tut_result.hpp.

Referenced by tut::util::deserialize(), and tut::util::serialize().


The documentation for this struct was generated from the following file:
All Rights Reserved. Generated on Sun Jan 31 00:39:48 2010 for TUT by doxygen 1.5.1