|
@ -65,4 +65,14 @@ mod tests { |
|
|
fn test_format_uptime_seconds() {
|
|
|
fn test_format_uptime_seconds() {
|
|
|
assert_eq!(format_uptime(35), "0h 0m 35s");
|
|
|
assert_eq!(format_uptime(35), "0h 0m 35s");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
|
fn test_format_uptime_minutes() {
|
|
|
|
|
|
assert_eq!(format_uptime(135), "0h 2m 15s");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
|
fn test_format_uptime_hours() {
|
|
|
|
|
|
assert_eq!(format_uptime(3735), "1h 2m 15s");
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|