test(app): pin format_duration hour-boundary cases

Add two boundary assertions to format_duration_renders_mss_and_hmmss:
59s -> "0:59" (last second of m:ss form) and 3599s -> "59:59" (final
second before the output switches to h:mm:ss at 3600).

Gemini-authored (junior), senior-reviewed against the real diff and
independently re-verified (cargo test --lib + clippy clean). First task
driven through the headless `agy --print --sandbox` loop.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 18:49:11 -04:00
co-authored by Claude Opus 4.8
parent 3d7d0fac11
commit 6541834e0d
+2
View File
@@ -1272,8 +1272,10 @@ mod tests {
fn format_duration_renders_mss_and_hmmss() {
assert_eq!(format_duration(0), "0:00");
assert_eq!(format_duration(5), "0:05");
assert_eq!(format_duration(59), "0:59");
assert_eq!(format_duration(65), "1:05");
assert_eq!(format_duration(600), "10:00");
assert_eq!(format_duration(3599), "59:59");
// Past an hour switches to h:mm:ss with zero-padded minutes/seconds.
assert_eq!(format_duration(3600), "1:00:00");
assert_eq!(format_duration(3661), "1:01:01");