FIND YOUR NEXT FEW LINES
Results for “cases”
Small, practical examples. Search by task or narrow things down below.
4 snippets foundClear filters
Check a function with table-driven cases
Check a function with table-driven cases using a complete Go program with explicit sample inputs.
Go✓ 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
Choose an action with switch
Map a small command value to a result.
switch✓ Tested
Round a halfway floating-point value
C: The C round function rounds halfway cases away from zero.
C✓ Tested