Condition used by a test case to decide whether it should be skipped before running hooks and test code.
More...
#include <kaycxx/test/skip.hpp>
|
| | skip_condition (std::string_view reason="") |
| | Creates a condition that always skips the test.
|
| |
| | skip_condition (std::move_only_function< bool()> condition, std::string_view reason="") |
| | Creates a dynamic skip condition.
|
| |
| bool | should_skip () |
| | Checks if the test should be skipped.
|
| |
| std::string const & | reason () const noexcept |
| | Returns the skip reason.
|
| |
Condition used by a test case to decide whether it should be skipped before running hooks and test code.
◆ skip_condition() [1/2]
| kaycxx::test::skip_condition::skip_condition |
( |
std::string_view |
reason = "" | ) |
|
|
explicit |
Creates a condition that always skips the test.
- Parameters
-
| reason | Optional reason why the test should be skipped. |
◆ skip_condition() [2/2]
| kaycxx::test::skip_condition::skip_condition |
( |
std::move_only_function< bool()> |
condition, |
|
|
std::string_view |
reason = "" |
|
) |
| |
Creates a dynamic skip condition.
- Parameters
-
| condition | Callback returning true when the test should be skipped. |
| reason | Optional reason why the test should be skipped. |
◆ reason()
| std::string const & kaycxx::test::skip_condition::reason |
( |
| ) |
const |
|
noexcept |
Returns the skip reason.
- Returns
- The skip reason, or an empty string if no reason was provided.
◆ should_skip()
| bool kaycxx::test::skip_condition::should_skip |
( |
| ) |
|
Checks if the test should be skipped.
- Returns
- True if the test should be skipped, false if it should run.
The documentation for this class was generated from the following file: