Enum quick_junit::TestCaseStatus
source · [−]pub enum TestCaseStatus {
Success {
flaky_runs: Vec<TestRerun>,
},
NonSuccess {
kind: NonSuccessKind,
message: Option<String>,
ty: Option<String>,
description: Option<String>,
reruns: Vec<TestRerun>,
},
Skipped {
message: Option<String>,
ty: Option<String>,
description: Option<String>,
},
}
Expand description
Represents the success or failure of a test case.
Variants
Success
Fields
This test case passed.
NonSuccess
Fields
kind: NonSuccessKind
Whether this test case failed in an expected way (failure) or an unexpected way (error).
This test case did not pass.
Skipped
Fields
This test case was not run.
Implementations
sourceimpl TestCaseStatus
impl TestCaseStatus
sourcepub fn non_success(kind: NonSuccessKind) -> Self
pub fn non_success(kind: NonSuccessKind) -> Self
Creates a new TestCaseStatus
that represents an unsuccessful test.
sourcepub fn set_message(&mut self, message: impl Into<String>) -> &mut Self
pub fn set_message(&mut self, message: impl Into<String>) -> &mut Self
Sets the message. No-op if this is a success case.
sourcepub fn set_type(&mut self, ty: impl Into<String>) -> &mut Self
pub fn set_type(&mut self, ty: impl Into<String>) -> &mut Self
Sets the type. No-op if this is a success case.
sourcepub fn set_description(&mut self, description: impl Into<String>) -> &mut Self
pub fn set_description(&mut self, description: impl Into<String>) -> &mut Self
Sets the description (text node). No-op if this is a success case.
sourcepub fn add_rerun(&mut self, rerun: TestRerun) -> &mut Self
pub fn add_rerun(&mut self, rerun: TestRerun) -> &mut Self
Adds a rerun or flaky run. No-op if this test was skipped.
sourcepub fn add_reruns(
&mut self,
reruns: impl IntoIterator<Item = TestRerun>
) -> &mut Self
pub fn add_reruns(
&mut self,
reruns: impl IntoIterator<Item = TestRerun>
) -> &mut Self
Adds reruns or flaky runs. No-op if this test was skipped.
Trait Implementations
sourceimpl Clone for TestCaseStatus
impl Clone for TestCaseStatus
sourcefn clone(&self) -> TestCaseStatus
fn clone(&self) -> TestCaseStatus
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for TestCaseStatus
impl Send for TestCaseStatus
impl Sync for TestCaseStatus
impl Unpin for TestCaseStatus
impl UnwindSafe for TestCaseStatus
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more