foundry_common::traits

Trait TestFunctionExt

Source
pub trait TestFunctionExt {
    // Provided methods
    fn test_function_kind(&self) -> TestFunctionKind { ... }
    fn is_setup(&self) -> bool { ... }
    fn is_any_test(&self) -> bool { ... }
    fn is_any_test_fail(&self) -> bool { ... }
    fn is_unit_test(&self) -> bool { ... }
    fn is_before_test_setup(&self) -> bool { ... }
    fn is_fuzz_test(&self) -> bool { ... }
    fn is_invariant_test(&self) -> bool { ... }
    fn is_after_invariant(&self) -> bool { ... }
    fn is_fixture(&self) -> bool { ... }
}
Expand description

Extension trait for Function.

Provided Methods§

Source

fn test_function_kind(&self) -> TestFunctionKind

Returns the kind of test function.

Source

fn is_setup(&self) -> bool

Returns true if this function is a setUp function.

Source

fn is_any_test(&self) -> bool

Returns true if this function is a unit, fuzz, or invariant test.

Source

fn is_any_test_fail(&self) -> bool

Returns true if this function is a test that should fail.

Source

fn is_unit_test(&self) -> bool

Returns true if this function is a unit test.

Source

fn is_before_test_setup(&self) -> bool

Returns true if this function is a beforeTestSetup function.

Source

fn is_fuzz_test(&self) -> bool

Returns true if this function is a fuzz test.

Source

fn is_invariant_test(&self) -> bool

Returns true if this function is an invariant test.

Source

fn is_after_invariant(&self) -> bool

Returns true if this function is an afterInvariant function.

Source

fn is_fixture(&self) -> bool

Returns true if this function is a fixture function.

Implementations on Foreign Types§

Source§

impl TestFunctionExt for str

Source§

impl TestFunctionExt for String

Source§

impl TestFunctionExt for Function

Implementors§