(#[case] input: &str, #[case] expected: i128)
| 137 | fn test_duration_parse(#[case] input: &str, #[case] expected: i64) { |
| 138 | let duration = Duration::parse_from_duration(input).unwrap(); |
| 139 | assert_eq!(duration.as_nanos(), expected); |
| 140 | let instant = Instant::parse_from_duration(input).unwrap(); |
| 141 | assert_eq!(instant.as_nanos(), expected); |
| 142 | } |
| 143 | |
| 144 | #[rstest] |
| 145 | #[case::trimming(" 1s ", NANOS_PER_SEC)] |
| 146 | #[case::case_insensitivity("1S", NANOS_PER_SEC)] |
| 147 | #[case::uppercase("1SEC", NANOS_PER_SEC)] |
nothing calls this directly
no outgoing calls
no test coverage detected