pub struct Case {
pub name: String,
pub classname: String,
pub status: Status,
pub duration: Option<Duration>,
pub message: Option<String>,
pub details: Option<String>,
pub stdout: Option<String>,
pub stderr: Option<String>,
pub expected: Option<String>,
pub actual: Option<String>,
}Expand description
One test case.
Fields§
§name: String§classname: String§status: Status§duration: Option<Duration>§message: Option<String>The failure, error or skip message.
details: Option<String>The failure body (a stack trace or assertion detail).
stdout: Option<String>§stderr: Option<String>§expected: Option<String>§actual: Option<String>Implementations§
Source§impl Case
impl Case
Sourcepub fn new(
name: impl Into<String>,
classname: impl Into<String>,
status: Status,
) -> Self
pub fn new( name: impl Into<String>, classname: impl Into<String>, status: Status, ) -> Self
A case with no message, output or duration.
Sourcepub fn full_name(&self) -> String
pub fn full_name(&self) -> String
classname.name, or the name alone when it already includes the
class (libtest paths, jest-junit titles).
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Whether this case failed or errored.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Case
impl<'de> Deserialize<'de> for Case
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Case
impl StructuralPartialEq for Case
Auto Trait Implementations§
impl Freeze for Case
impl RefUnwindSafe for Case
impl Send for Case
impl Sync for Case
impl Unpin for Case
impl UnsafeUnpin for Case
impl UnwindSafe for Case
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.