Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

assertion

A check that panics if something isn't true.

assert! and assert_eq! panic with a message when their condition or equality doesn't hold.

Examples

  • assert_eq!(2 + 2, 5) panics with the message "assertion left == right failed", then shows left: 4 and right: 5.

Read the full section →