Represents a test method.
- Namespace
- xtd::tunit
- Library
- xtd.tunit
- Examples
- test_class_without_helpers.cpp.
◆ test() [1/3]
xtd::tunit::test::test |
( |
| ) |
|
|
default |
Creates a new test instance.
◆ test() [2/3]
Creates a new test instance with specified name, method and stack frame.
- Parameters
-
name | Represents the name of the method. Generally is the same name as the method name. |
method | The method that contains the test. |
stack_frame | The stack frame of the method. |
◆ test() [3/3]
Creates a new test instance with specified name, method and stack frame.
- Parameters
-
name | Represents the name of the method. Generally is the same name as the method name. |
method | The method that contains the test. |
ignored | If true, the test will be ignored during tests execution; otherwise, the test will be taken into account during tests execution. |
stack_frame | The stack frame of the method. |
◆ aborted()
bool xtd::tunit::test::aborted |
( |
| ) |
const |
|
noexcept |
Gets a value that represent an aborted test.
- Returns
- true is the test is aborted; otherwise false.
◆ actual()
Gets the actual value string.
- Returns
- The actual value string. Can be empty.
◆ elapsed_time()
Gets the elapsed time of the test method.
- Returns
- The elapsed time of the test method.
◆ expect()
Gets the expect value string.
- Returns
- The expect value string. Can be empty.
◆ failed()
bool xtd::tunit::test::failed |
( |
| ) |
const |
|
noexcept |
Gest a value that represent an failed test.
- Returns
- tru is the test is failed; otherwise false.
◆ ignored()
bool xtd::tunit::test::ignored |
( |
| ) |
const |
|
noexcept |
Get a value that represent an ignored test.
- Returns
- true is the test is ignored; otherwise false.
◆ not_started()
bool xtd::tunit::test::not_started |
( |
| ) |
const |
|
noexcept |
Get a value that represent a not started test.
- Returns
- true is the test is not started; otherwise false.
◆ succeed()
bool xtd::tunit::test::succeed |
( |
| ) |
const |
|
noexcept |
Gets a value that represent an succeed test.
- Returns
- true is the test is succeed; otherwise false.
◆ stack_frame()
Gets the stack frame of the test method.
- Returns
- The stack frame of the test method.
◆ start_time()
Gets the start time of the test method.
- Returns
- The start time of the test method.
◆ method()
std::function< void()> xtd::tunit::test::method |
( |
| ) |
const |
|
noexcept |
Gets the test method.
- Returns
- The test method.
◆ message()
const xtd::string & xtd::tunit::test::message |
( |
| ) |
const |
|
noexcept |
Gets the message.
- Returns
- The message.
◆ name()
Gets the name of the test method.
- Returns
- The nzme of the test method.
◆ user_message()
const xtd::string & xtd::tunit::test::user_message |
( |
| ) |
const |
|
noexcept |
Gets the user message.
- Returns
- The user message.
The documentation for this class was generated from the following file: