Skip to content

Glossary: Software Design Patterns in Rust

Characterization test

Also written: characterization tests

A test that records what existing code does today, right or wrong, so you can refactor safely. For example, the old `place_order` totals of 467.5, 42.6 and 31.25 become expected values that the redesigned code must still produce.

Where the book teaches it

Related terms

#[test]assert_eq!