From 6541834e0d677b86f22c8ce3ff17ef5183b1a961 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Fri, 5 Jun 2026 18:49:11 -0400 Subject: [PATCH] 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 --- src/app/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/mod.rs b/src/app/mod.rs index b23f231..339a632 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -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");