[][src]Struct quickcheck::TestResult

pub struct TestResult { /* fields omitted */ }

Describes the status of a single instance of a test.

All testable things must be capable of producing a TestResult.

Implementations

impl TestResult[src]

pub fn passed() -> TestResult[src]

Produces a test result that indicates the current test has passed.

pub fn failed() -> TestResult[src]

Produces a test result that indicates the current test has failed.

pub fn error<S: Into<String>>(msg: S) -> TestResult[src]

Produces a test result that indicates failure from a runtime error.

pub fn discard() -> TestResult[src]

Produces a test result that instructs quickcheck to ignore it. This is useful for restricting the domain of your properties. When a test is discarded, quickcheck will replace it with a fresh one (up to a certain limit).

pub fn from_bool(b: bool) -> TestResult[src]

Converts a bool to a TestResult. A true value indicates that the test has passed and a false value indicates that the test has failed.

pub fn must_fail<T, F>(f: F) -> TestResult where
    F: FnOnce() -> T,
    F: 'static,
    T: 'static, 
[src]

Tests if a "procedure" fails when executed. The test passes only if f generates a task failure during its execution.

pub fn is_failure(&self) -> bool[src]

Returns true if and only if this test result describes a failing test.

pub fn is_error(&self) -> bool[src]

Returns true if and only if this test result describes a failing test as a result of a run time error.

Trait Implementations

impl Clone for TestResult[src]

impl Debug for TestResult[src]

impl Testable for TestResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.