Results for “standard”
Small, practical examples. Search by task or narrow things down below.
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
Check a literal prefix with ordinal comparison
C#: Choose StringComparison.Ordinal when a prefix is a protocol token rather than culture-dependent text.
C#✓ Tested
Check a string prefix
Java: Use startsWith to check a literal Java prefix without a regular expression.
Java✓ Tested
Check an extension without case sensitivity
C#: Use an explicit ordinal case-insensitive comparison for a known filename suffix.
C#✓ Tested
Check any and all stream elements
Java: Use short-circuiting match operations for predicates over a Java collection.
Java✓ Tested
Check available disk space
Show total, used, and available filesystem space for the current directory in human-readable units.
disk✓ Tested
Check memory usage
Show memory and swap totals in human-readable units. The available column estimates memory usable by new applications.
memory✓ Tested
Check the Gregorian leap-year rule
Java: Use Year.isLeap rather than checking divisibility by four alone.
Java✓ Tested
Check the size of a folder
Show a single total for the disk space used by a folder and its contents.
disk usage✓ Tested
Check whether a floating-point value is finite
Check whether a floating-point value is finite in a complete Rust program using the standard library.
Rust✓ Tested
Check whether all required keys exist
Python: Compare the required key set with a dictionary key view.
Python✓ Tested
Check whether bytes contain valid JSON
Check whether bytes contain valid JSON using a complete Go program with explicit sample inputs.
Go✓ Tested