()
| 78 | |
| 79 | #[test] |
| 80 | fn record_is_monotonic() { |
| 81 | let mut av = AckVector::new(); |
| 82 | av.record(r(1), hlc(100)); |
| 83 | av.record(r(1), hlc(50)); // lower — must be ignored |
| 84 | assert_eq!(av.ack_for(r(1)), Some(hlc(100))); |
| 85 | |
| 86 | av.record(r(1), hlc(200)); // higher — must advance |
| 87 | assert_eq!(av.ack_for(r(1)), Some(hlc(200))); |
| 88 | } |
| 89 | |
| 90 | #[test] |
| 91 | fn min_returns_lowest() { |