()
| 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() { |
nothing calls this directly
no outgoing calls
no test coverage detected