Introduction

Completed

Rust comes with a simple yet powerful test suite built into the language. This unit will explore how we can write different test strategies to ensure our program's correctness even further.

Learning objectives

In this module, you'll learn:

  • How to write unit tests.
  • How to write integration tests.
  • How to write documentation tests.

Prerequisites

  • Have your Rust development environment set up.
  • Know how to create, edit, and run Rust code by using Cargo.
  • Know how to create functions.
  • Understand how control flow, specifically if, statements work in Rust.