tut logo

tut::test_result Struct Reference


Public Types | Public Member Functions | Public Attributes | List of all members
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]

Public Types

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

Public Member Functions

 test_result ()
 
 test_result (const std::string &grp, int pos, const std::string &test_name, result_type res)
 
 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, const std::string &ex_typeid, const std::string &msg)
 

Public Attributes

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

Detailed Description

Return type of runned test/test group.

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

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

Constructor & Destructor Documentation

tut::test_result::test_result ( )
inline

Default constructor.

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

Constructor.

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.

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.

Member Data Documentation

std::string tut::test_result::group

Test group name.

Referenced by tut::console_reporter::run_completed(), tut::console_reporter::test_completed(), and tut::xml_reporter::test_completed().

std::string tut::test_result::message

Exception message for failed test.

Referenced by tut::console_reporter::run_completed(), and tut::test_group< class, int >::run_test_().

std::string tut::test_result::name

Test name (optional)

Referenced by tut::console_reporter::run_completed(), and tut::test_group< class, int >::run_test_().

int tut::test_result::test

Test number in group.

Referenced by tut::console_reporter::run_completed().


The documentation for this struct was generated from the following file:
All Rights Reserved. Generated on Wed Dec 18 2013 11:19:52 for TUT by doxygen 1.8.5