pub enum TestResult {
Passed,
Discard,
}Expand description
A test result reported from the test case.
A test case annotated with #[fuzztest], #[fuzz], or #[proptest] can optionally return a
TestResult to indicate whether a test should be treated as discarded or passed.
If the test does not have a return value, all non-panicking test cases default to passed.
Variants§
Passed
Indicates that a test passed.
Discard
Indicates that a test should be discarded.
For property testing, discarding a test result will cause quickcheck or proptest to try
to generate more test cases to find non-discarded ones, up to a certain limit set by the
framework. This corresponds to quickcheck::TestResult::discard and
proptest::test_runner::TestCaseError::Reject.
For fuzzing, a discarded result will not be added to the corpus, corresponding to
libfuzzer_sys::Corpus::Reject.
Trait Implementations§
Source§impl From<()> for TestResult
impl From<()> for TestResult
Source§impl From<TestResult> for TestResult
Available on crate feature quickcheck only.
impl From<TestResult> for TestResult
quickcheck only.