Struct quickcheck::TestResult
[−]
[src]
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
.
Methods
impl TestResult
[src]
impl TestResult
pub fn passed() -> TestResult
[src]
pub fn passed() -> TestResult
Produces a test result that indicates the current test has passed.
pub fn failed() -> TestResult
[src]
pub fn failed() -> TestResult
Produces a test result that indicates the current test has failed.
pub fn error<S: Into<String>>(msg: S) -> TestResult
[src]
pub fn error<S: Into<String>>(msg: S) -> TestResult
Produces a test result that indicates failure from a runtime error.
pub fn discard() -> TestResult
[src]
pub fn discard() -> TestResult
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]
pub fn from_bool(b: bool) -> TestResult
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: Send + 'static,
T: Send + 'static,
[src]
pub fn must_fail<T, F>(f: F) -> TestResult where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
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]
pub fn is_failure(&self) -> bool
Returns true
if and only if this test result describes a failing
test.
pub fn is_error(&self) -> bool
[src]
pub fn is_error(&self) -> bool
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 Clone for TestResult
fn clone(&self) -> TestResult
[src]
fn clone(&self) -> TestResult
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for TestResult
[src]
impl Debug for TestResult
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Testable for TestResult
[src]
impl Testable for TestResult
fn result<G: Gen>(&self, _: &mut G) -> TestResult
[src]
fn result<G: Gen>(&self, _: &mut G) -> TestResult
Auto Trait Implementations
impl Send for TestResult
impl Send for TestResult
impl Sync for TestResult
impl Sync for TestResult