Failures v0.1.0
The failure a test returns, and skipping a test.
TestFailure
pub struct TestFailure {
// private fields
}
Why a test did not pass. Copy.
A test fails with it through fail or ?, and is counted as skipped rather than failed when it was made with
Skip.
Associated functions
Of
pub func Of(message: char8[..]) -> TestFailure
A failure saying message.
| Name | Type | Description |
|---|---|---|
message | char8[..] | what went wrong |
Returns: the failure
Skip
pub func Skip(reason: char8[..]) -> TestFailure
A skip, which the runner counts apart from failures, saying why the test did not run.
| Name | Type | Description |
|---|---|---|
reason | char8[..] | why it was skipped |
Returns: the skip
Methods
Message
pub func Message(self: &TestFailure) -> char8[..]
The message, or a skip's reason.
Returns: the message
IsSkip
pub func IsSkip(self: &TestFailure) -> bool
Whether this is a skip rather than a failure.
Returns: whether the test was skipped