Case

Trait Case 

Source
pub trait Case:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &str;
    fn kind(&self) -> TestKind;
    fn source(&self) -> Option<&Source>;
    fn exclusive(&self, state: &TestContext) -> bool;
    fn run(&self, state: &TestContext) -> Result<(), RunError>;
}

Required Methods§

Source

fn name(&self) -> &str

The name of a test

By convention this follows the rules for rust paths; i.e., it should be a series of identifiers separated by double colons. This way if some test runner wants to arrange the tests hierarchically it may.

Source

fn kind(&self) -> TestKind

Source

fn source(&self) -> Option<&Source>

Source

fn exclusive(&self, state: &TestContext) -> bool

This case cannot run in parallel to other cases within this binary

Source

fn run(&self, state: &TestContext) -> Result<(), RunError>

Implementors§