Results for “Testing & reusable helpers”
Small, practical examples. Search by task or narrow things down below.
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
Centralize a reusable validation rule
Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Connect a reusable label using useId
Connect a reusable label using useId with a small React component and explicit browser behavior.
React✓ Tested
Create a reusable one-to-many lookup
C#: ToLookup groups values by key and returns an empty sequence for an unknown key.
C#✓ Tested
Expose a reusable filtered view
SQL: A view stores a query definition rather than a snapshot of its rows.
SQL✓ Tested