()
| 1020 | |
| 1021 | #[test] |
| 1022 | fn test_leaf_value_encoding_roundtrip() { |
| 1023 | let data = SerializedLeaf { |
| 1024 | branch_id: BranchId::new(NodeId::new(42), 5), |
| 1025 | kind: TokenKind::Word, |
| 1026 | state: LeafState::Alive, |
| 1027 | content_start: 100, |
| 1028 | content_end: 200, |
| 1029 | }; |
| 1030 | |
| 1031 | let bytes = encode_leaf_value(&data); |
| 1032 | assert_eq!(bytes.len(), 22); |
| 1033 | |
| 1034 | let decoded = decode_leaf_value(&bytes); |
| 1035 | assert_eq!(data, decoded); |
| 1036 | } |
| 1037 | |
| 1038 | #[test] |
| 1039 | fn test_leaf_value_encoding_all_token_kinds() { |
nothing calls this directly
no test coverage detected