()
| 283 | |
| 284 | #[test] |
| 285 | fn to_bytes_roundtrip() { |
| 286 | let hlc = Hlc::new(123_456_789, 7, ReplicaId::new(0xabcd)).unwrap(); |
| 287 | let bytes = hlc.to_bytes(); |
| 288 | let back = Hlc::from_bytes(&bytes); |
| 289 | assert_eq!(hlc, back); |
| 290 | } |
| 291 | |
| 292 | #[test] |
| 293 | fn byte_order_matches_lexicographic() { |