O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Motivation and high-level view

As you may know already, automatic testing of small pieces of functionality is one of the most practical and effective ways of maintaining high code quality. It does not prove that bugs don't exist, but it hands out to your computer the most boring and repetitive task of checking known input-output pairs.

The consequences of the smart use of unit testing are profound. In the implementation phase, a well-written unit test becomes an informal specification for a tiny part of the system, which makes it very easy for the coder to recognize when a part has been completed, when its unit tests pass. Then, in the maintenance phase, the existing unit tests serve as a harness against regressions in the codebase, which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required