libept
Public Member Functions | Public Attributes | List of all members
ept::tests::TestMethodResult Struct Reference

Result of running a test method. More...

#include <tests.h>

Public Member Functions

 TestMethodResult (const std::string &test_case, const std::string &test_method)
 
void set_failed (TestFailed &e)
 
void set_exception (std::exception &e)
 
void set_unknown_exception ()
 
void set_setup_exception (std::exception &e)
 
void set_teardown_exception (std::exception &e)
 
bool is_success () const
 

Public Attributes

std::string test_case
 Name of the test case. More...
 
std::string test_method
 Name of the test method. More...
 
std::string error_message
 If non-empty, the test failed with this error. More...
 
TestStack error_stack
 Stack frame of where the error happened. More...
 
std::string exception_typeid
 If non-empty, the test raised an exception and this is its type ID. More...
 
bool skipped = false
 True if the test has been skipped. More...
 

Detailed Description

Result of running a test method.

Constructor & Destructor Documentation

◆ TestMethodResult()

ept::tests::TestMethodResult::TestMethodResult ( const std::string &  test_case,
const std::string &  test_method 
)
inline

Member Function Documentation

◆ is_success()

bool ept::tests::TestMethodResult::is_success ( ) const
inline

◆ set_exception()

void ept::tests::TestMethodResult::set_exception ( std::exception &  e)
inline

◆ set_failed()

void ept::tests::TestMethodResult::set_failed ( TestFailed e)
inline

◆ set_setup_exception()

void ept::tests::TestMethodResult::set_setup_exception ( std::exception &  e)
inline

◆ set_teardown_exception()

void ept::tests::TestMethodResult::set_teardown_exception ( std::exception &  e)
inline

◆ set_unknown_exception()

void ept::tests::TestMethodResult::set_unknown_exception ( )
inline

Member Data Documentation

◆ error_message

std::string ept::tests::TestMethodResult::error_message

If non-empty, the test failed with this error.

◆ error_stack

TestStack ept::tests::TestMethodResult::error_stack

Stack frame of where the error happened.

◆ exception_typeid

std::string ept::tests::TestMethodResult::exception_typeid

If non-empty, the test raised an exception and this is its type ID.

◆ skipped

bool ept::tests::TestMethodResult::skipped = false

True if the test has been skipped.

Referenced by ept::tests::TestCase::run_test(), and ept::tests::SimpleTestController::test_method_end().

◆ test_case

std::string ept::tests::TestMethodResult::test_case

Name of the test case.

Referenced by ept::tests::SimpleTestController::test_method_begin().

◆ test_method

std::string ept::tests::TestMethodResult::test_method

Name of the test method.


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