tut::test_result Struct Reference

Return type of runned test/test group. More...

`#include <tut.h>`

## Public Types

enum | result_type { ok, fail, ex, warn, term, ex_ctor }
| 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 More...

## Public Member Functions

| test_result ()
| Default constructor. More...
| test_result (const std::string &grp, int pos, result_type res)
| Constructor. More...
| test_result (const std::string &grp, int pos, result_type res, const std::exception &ex)
| Constructor with exception. More...

## Public Attributes

std::string | group
| Test group name. More...
int | test
| Test number in group. More...
result_type | result
std::string | message
| Exception message for failed test. More...
std::string | exception_typeid

## 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

## result_type

enum tut::test_result::result_type

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

Enumerator
ok |
fail |
ex |
warn |
term |
ex_ctor |

## Constructor & Destructor Documentation

## test_result() [1/3]

tut::test_result::test_result | ( |  | ) |

inline

Default constructor.

## test_result() [2/3]

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

inline

Constructor.

## test_result() [3/3]

tut::test_result::test_result | ( | const std::string & | grp,
|  | int | pos,
|  | result_type | res,
|  | const std::exception & | ex
| ) |  |

inline

Constructor with exception.

## Member Data Documentation

## exception_typeid

std::string tut::test_result::exception_typeid

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

## group

std::string tut::test_result::group

Test group name.

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

## message

std::string tut::test_result::message

Exception message for failed test.

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

## result

result_type tut::test_result::result

Referenced by tut::util::deserialize(), tut::reporter::run_completed(), tut::test_runner::run_test(), tut::util::serialize(), and tut::reporter::test_completed().

## test

int tut::test_result::test

Test number in group.

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

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

- tut.h