pub struct Test {
pub path: PathBuf,
pub expect_path: PathBuf,
pub state: State,
pub saved: bool,
pub test_suite: Id,
}
Expand description
Store information related to a test.
Fields§
§path: PathBuf
Path of the test
expect_path: PathBuf
Location of the expect string.
state: State
Result of comparison
saved: bool
The results of this structure were saved.
test_suite: Id
Id for the test suite that owns this test.
Implementations§
source§impl Test
impl Test
sourcepub async fn save_results(&mut self) -> Result<(), RuntError>
pub async fn save_results(&mut self) -> Result<(), RuntError>
Save the results of the test suite into the expect file.
sourcepub fn should_save(&self, opts: &Opts) -> bool
pub fn should_save(&self, opts: &Opts) -> bool
Returns true if the current options require this test to be saved.
sourcepub fn should_print(&self, opts: &Opts) -> bool
pub fn should_print(&self, opts: &Opts) -> bool
Returns true if this test should be printed with the current options.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Test
impl Send for Test
impl Sync for Test
impl Unpin for Test
impl UnwindSafe for Test
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