MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_format_duration

Function test_format_duration

crates/opencode-util/src/util.rs:307–315  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305
306 #[test]
307 fn test_format_duration() {
308 assert_eq!(format::format_duration(0), "");
309 assert_eq!(format::format_duration(30), "30s");
310 assert_eq!(format::format_duration(90), "1m 30s");
311 assert_eq!(format::format_duration(3600), "1h");
312 assert_eq!(format::format_duration(3661), "1h 1m");
313 assert_eq!(format::format_duration(86400), "~1 day");
314 assert_eq!(format::format_duration(172800), "~2 days");
315 }
316
317 #[test]
318 fn test_format_bytes() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected