pub struct SnapshotSuite { /* private fields */ }Expand description
Snapshot test suite manager
Implementations§
Source§impl SnapshotSuite
impl SnapshotSuite
Sourcepub fn record(
&self,
test_name: &str,
expr: &TLExpr,
context: &CompilerContext,
expr_string: &str,
) -> Result<()>
pub fn record( &self, test_name: &str, expr: &TLExpr, context: &CompilerContext, expr_string: &str, ) -> Result<()>
Record a snapshot
Sourcepub fn verify(
&self,
test_name: &str,
expr: &TLExpr,
context: &CompilerContext,
expr_string: &str,
) -> Result<SnapshotDiff>
pub fn verify( &self, test_name: &str, expr: &TLExpr, context: &CompilerContext, expr_string: &str, ) -> Result<SnapshotDiff>
Verify against a recorded snapshot
Sourcepub fn update(
&self,
test_name: &str,
expr: &TLExpr,
context: &CompilerContext,
expr_string: &str,
) -> Result<()>
pub fn update( &self, test_name: &str, expr: &TLExpr, context: &CompilerContext, expr_string: &str, ) -> Result<()>
Update a snapshot (re-record)
Sourcepub fn list_snapshots(&self) -> Result<Vec<String>>
pub fn list_snapshots(&self) -> Result<Vec<String>>
List all snapshots in the suite
Auto Trait Implementations§
impl Freeze for SnapshotSuite
impl RefUnwindSafe for SnapshotSuite
impl Send for SnapshotSuite
impl Sync for SnapshotSuite
impl Unpin for SnapshotSuite
impl UnwindSafe for SnapshotSuite
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more