[][src]Macro insta::assert_snapshot

macro_rules! assert_snapshot {
    ($value:expr, @$snapshot:literal) => { ... };
    ($value:expr, $debug_expr:expr, @$snapshot:literal) => { ... };
    ($name:expr, $value:expr) => { ... };
    ($name:expr, $value:expr, $debug_expr:expr) => { ... };
    ($value:expr) => { ... };
}

Asserts a string snapshot.

This is the most simplistic of all assertion methods. It just accepts a string to store as snapshot an does not apply any other transformations on it. This is useful to build ones own primitives.

This example is not tested
assert_snapshot!("reference value to snapshot");

Optionally a third argument can be given as expression which will be stringified as debug expression. For more information on this look at the source of this macro and other assertion macros.

Additionally the name is optional. For more information see unnamed snapshots