Skip to content

Glossary: Software Design Patterns in Rust

assert_eq!

Also written: assert!

A macro used in tests that panics if two values are not equal, which makes the test fail. It is how the tests check that totals like 467.5 stay the same.

Where the book teaches it

Related terms

#[test]Characterization test