Struct PlanRunner

Source
pub struct PlanRunner(/* private fields */);

Implementations§

Source§

impl Plan

Source

pub fn new() -> Self

Source

pub fn new_case(&self, name: &str) -> CaseProxy<'_>

Source

pub fn abort(&self, reason: &str)

Source

pub fn ok<D, F, R>(&self, desc: D, f: F) -> TestResult<R>
where F: FnOnce() -> R, R: AsStatus, D: Into<Desc>,

Source

pub fn fail<D, F, R>(&self, desc: D, f: F) -> TestResult<R>
where F: FnOnce() -> R, R: AsStatus, D: Into<Desc>,

Source

pub fn fail_nopanic<D, F, R>(&self, desc: D, f: F) -> TestResult<R>
where F: FnOnce() -> R, R: AsStatus, D: Into<Desc>,

Source

pub fn panic<D, F, R>(&self, desc: D, f: F) -> TestResult<R>
where F: FnOnce() -> R, R: AsStatus, D: Into<Desc>,

Source

pub fn skip<D>(&self, desc: D)
where D: Into<Desc>,

Source

pub fn todo<D, F, R>(&self, desc: D, f: F) -> TestResult<R>
where F: FnOnce() -> R, R: AsStatus, D: Into<Desc>,

Source

pub fn comment(&self, s: &str)

Source

pub fn cmp<D, T, F, R, C>( &self, desc: D, exp: T, f: F, cmp: C, ) -> TestResult<()>
where T: Debug, F: FnOnce() -> R, R: PartialEq<T> + Debug + Clone, D: Into<Desc>, C: FnOnce(&R, &T) -> bool,

Source

pub fn eq<D, T, F, R>(&self, desc: D, exp: T, f: F) -> TestResult<()>
where T: Debug, F: FnOnce() -> R, R: PartialEq<T> + Debug + Clone, D: Into<Desc>,

Source

pub fn ne<D, T, F, R>(&self, desc: D, exp: T, f: F) -> TestResult<()>
where T: Debug, F: FnOnce() -> R, R: PartialEq<T> + Debug + Clone, D: Into<Desc>,

Source

pub fn run<F>(&self, name: &str, f: F) -> TestStatus
where F: FnOnce(&Self),

Source

pub fn new_plan<'a>(&'a self, name: &str) -> Opts<'a>

Source

pub unsafe fn override_status(&self, status: TestStatus) -> TestStatus

§Safety
Source

pub fn is_ok(&self) -> bool

Source

pub fn destruct(self)

Trait Implementations§

Source§

impl Default for Plan

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Plan

§

impl RefUnwindSafe for Plan

§

impl Send for Plan

§

impl Sync for Plan

§

impl Unpin for Plan

§

impl UnwindSafe for Plan

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.