(
#[case] first: ClockParameters,
#[case] second: event::Ntp,
#[case] period: Period,
#[case] max_dispersion: Skew,
#[case] expected: bool,
)
| 216 | false |
| 217 | )] |
| 218 | fn compare_clock_error_bound( |
| 219 | #[case] first: ClockParameters, |
| 220 | #[case] second: event::Ntp, |
| 221 | #[case] period: Period, |
| 222 | #[case] max_dispersion: Skew, |
| 223 | #[case] expected: bool, |
| 224 | ) { |
| 225 | let val = ClockParameters { |
| 226 | tsc_count: second.tsc_midpoint(), |
| 227 | time: second |
| 228 | .data() |
| 229 | .server_recv_time |
| 230 | .midpoint(second.data().server_send_time), |
| 231 | clock_error_bound: second.calculate_clock_error_bound(period), |
| 232 | period, |
| 233 | period_max_error: Period::from_seconds(1e-11), // unused |
| 234 | as_of_monotonic: Instant::from_days(1) + Duration::from_nanos(500), // unused |
| 235 | }; |
| 236 | let result = val.more_accurate_than(&first, max_dispersion); |
| 237 | assert_eq!(result, expected); |
| 238 | } |
| 239 | |
| 240 | #[rstest] |
| 241 | #[case::high_skew_old_vs_new( |
nothing calls this directly
no test coverage detected