Macro insta::assert_snapshot[][src]

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.

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.

The snapshot name is optional.