Function snapbox::assert_eq

source ยท
pub fn assert_eq(expected: impl Into<Data>, actual: impl Into<Data>)
๐Ÿ‘ŽDeprecated since 0.5.11: Replaced with assert_data_eq!(actual, expected.raw())
Expand description

Check if a value is the same as an expected value

When the content is text, newlines are normalized.

let output = "something";
let expected = "something";
assert_eq(expected, output);

Can combine this with file!

let actual = "something";
assert_eq(file!["output.txt"], actual);