Failures v0.1.0

Source
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.

Source

Associated functions

Of

pub func Of(message: char8[..]) -> TestFailure

A failure saying message.

NameTypeDescription
messagechar8[..]what went wrong

Returns: the failure

Source

Skip

pub func Skip(reason: char8[..]) -> TestFailure

A skip, which the runner counts apart from failures, saying why the test did not run.

NameTypeDescription
reasonchar8[..]why it was skipped

Returns: the skip

Source

Methods

Message

pub func Message(self: &TestFailure) -> char8[..]

The message, or a skip's reason.

Returns: the message

Source

IsSkip

pub func IsSkip(self: &TestFailure) -> bool

Whether this is a skip rather than a failure.

Returns: whether the test was skipped

Source