[][src]Macro insta::assert_snapshot_matches

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

Assets 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_matches!("snapshot_name", "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.