Trait quickcheck::Testable
[−]
[src]
pub trait Testable: Send + 'static { fn result<G: Gen>(&self, _: &mut G) -> TestResult; }
Testable
describes types (e.g., a function) whose values can be
tested.
Anything that can be tested must be capable of producing a TestResult
given a random number generator. This is trivial for types like bool
,
which are just converted to either a passing or failing test result.
For functions, an implementation must generate random arguments and potentially shrink those arguments if they produce a failure.
It's unlikely that you'll have to implement this trait yourself.
Required Methods
fn result<G: Gen>(&self, _: &mut G) -> TestResult
Implementations on Foreign Types
impl Testable for bool
[src]
impl Testable for bool
fn result<G: Gen>(&self, _: &mut G) -> TestResult
[src]
fn result<G: Gen>(&self, _: &mut G) -> TestResult
impl Testable for ()
[src]
impl Testable for ()
fn result<G: Gen>(&self, _: &mut G) -> TestResult
[src]
fn result<G: Gen>(&self, _: &mut G) -> TestResult
impl<A, E> Testable for Result<A, E> where
A: Testable,
E: Debug + Send + 'static,
[src]
impl<A, E> Testable for Result<A, E> where
A: Testable,
E: Debug + Send + 'static,
fn result<G: Gen>(&self, g: &mut G) -> TestResult
[src]
fn result<G: Gen>(&self, g: &mut G) -> TestResult
impl<T: Testable> Testable for fn() -> T
[src]
impl<T: Testable> Testable for fn() -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug> Testable for fn(_: A) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug> Testable for fn(_: A) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug> Testable for fn(_: A, _: B) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug> Testable for fn(_: A, _: B) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug, J: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug, J: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug, J: Arbitrary + Debug, K: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug, J: Arbitrary + Debug, K: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug, J: Arbitrary + Debug, K: Arbitrary + Debug, L: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, _: L) -> T
[src]
impl<T: Testable, A: Arbitrary + Debug, B: Arbitrary + Debug, C: Arbitrary + Debug, D: Arbitrary + Debug, E: Arbitrary + Debug, F: Arbitrary + Debug, G: Arbitrary + Debug, H: Arbitrary + Debug, I: Arbitrary + Debug, J: Arbitrary + Debug, K: Arbitrary + Debug, L: Arbitrary + Debug> Testable for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, _: L) -> T
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
[src]
fn result<G_: Gen>(&self, g: &mut G_) -> TestResult
Implementors
impl Testable for TestResult