Results for “Testing & reusable patterns”
Small, practical examples. Search by task or narrow things down below.
Assert approximate floating-point equality
Assert approximate floating-point equality in a complete Rust program using the standard library.
Rust✓ Tested
Borrow text until a modification is needed
Borrow text until a modification is needed in a complete Rust program using the standard library.
Rust✓ Tested
Check a deterministic result with an assertion
Check a deterministic result with an assertion in a complete Rust program using the standard library.
Rust✓ Tested
Collect borrowed values into owned strings
Collect borrowed values into owned strings in a complete Rust program using the standard library.
Rust✓ Tested
Exercise a function with a table of inputs
Exercise a function with a table of inputs in a complete Rust program using the standard library.
Rust✓ Tested
Move a collection out and leave an empty default
Move a collection out and leave an empty default in a complete Rust program using the standard library.
Rust✓ Tested
Own a heap-allocated value with Box
Own a heap-allocated value with Box in a complete Rust program using the standard library.
Rust✓ Tested
Read bytes through an in-memory cursor
Read bytes through an in-memory cursor in a complete Rust program using the standard library.
Rust✓ Tested
Replace a value and keep the old value
Replace a value and keep the old value in a complete Rust program using the standard library.
Rust✓ Tested
Write formatted text into a byte buffer
Write formatted text into a byte buffer in a complete Rust program using the standard library.
Rust✓ Tested
Announce a status update with a live region
Announce a status update with a live region with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Associate a validation message with a field
Associate a validation message with a field with a standalone Angular component and explicit browser behavior.
Angular✓ Tested