()
| 803 | |
| 804 | #[test] |
| 805 | fn test_trunk_id_encoding_ordering() { |
| 806 | let id1 = TrunkId::new(NodeId::new(1), 0); |
| 807 | let id2 = TrunkId::new(NodeId::new(1), 1); |
| 808 | let id3 = TrunkId::new(NodeId::new(2), 0); |
| 809 | |
| 810 | let bytes1 = encode_trunk_id(&id1); |
| 811 | let bytes2 = encode_trunk_id(&id2); |
| 812 | let bytes3 = encode_trunk_id(&id3); |
| 813 | |
| 814 | assert!(bytes1 < bytes2, "same change, lower idx should sort first"); |
| 815 | assert!(bytes2 < bytes3, "lower change_id should sort first"); |
| 816 | } |
| 817 | |
| 818 | #[test] |
| 819 | fn test_branch_id_encoding_roundtrip() { |
nothing calls this directly
no test coverage detected