MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / parse_hms_hours

Function parse_hms_hours

crates/hyperqueue/src/common/utils/time.rs:155–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153
154 #[test]
155 fn parse_hms_hours() {
156 let duration = parse_hms_time_inner().parse_text("1:1:1").unwrap();
157 assert_eq!(duration.as_secs(), 3600 + 60 + 1);
158
159 let duration = parse_hms_time_inner().parse_text("02:03:04").unwrap();
160 assert_eq!(duration.as_secs(), 2 * 3600 + 3 * 60 + 4);
161 }
162
163 #[test]
164 fn parse_hms_no_number() {

Callers

nothing calls this directly

Calls 2

parse_hms_time_innerFunction · 0.85
parse_textMethod · 0.80

Tested by

no test coverage detected