1 #ifndef TUT_RESULT_H_GUARD
2 #define TUT_RESULT_H_GUARD
9 #if defined(TUT_USE_POSIX)
10 struct test_result_posix
20 struct test_result_posix
26 * Return type of runned test/test group.
28 * For test: contains result of test and, possible, message
29 * for failure or exception.
31 struct test_result : public test_result_posix
39 * Test number in group.
44 * Test name (optional)
49 * ok - test finished successfully
50 * fail - test failed with ensure() or fail() methods
51 * ex - test throwed an exceptions
52 * warn - test finished successfully, but test destructor throwed
53 * term - test forced test application to terminate abnormally
70 * Exception message for failed test.
73 std::string exception_typeid;
76 * Default constructor.
87 test_result(const std::string& grp, int pos,
88 const std::string& test_name, result_type res)
97 * Constructor with exception.
99 test_result(const std::string& grp,int pos,
100 const std::string& test_name, result_type res,
101 const std::exception& ex)
107 exception_typeid(typeid(ex).name())
111 /** Constructor with typeid.
113 test_result(const std::string& grp,int pos,
114 const std::string& test_name, result_type res,
115 const std::string& ex_typeid,
116 const std::string& msg)
122 exception_typeid(ex_typeid)