()
| 833 | |
| 834 | #[test] |
| 835 | fn test_update_leaf_content() { |
| 836 | let mut txn = MockCrdtTxn::new(); |
| 837 | let branch_id = BranchId::new(NodeId::new(1), 0); |
| 838 | let leaf_id = LeafId::new(NodeId::new(1), 0); |
| 839 | let leaf = Leaf::new(leaf_id, branch_id, TokenKind::Word, 0..5); |
| 840 | |
| 841 | txn.put_leaf(&leaf, None).unwrap(); |
| 842 | txn.update_leaf_content(leaf_id, 10..20).unwrap(); |
| 843 | |
| 844 | let retrieved = txn.get_leaf(leaf_id).unwrap().unwrap(); |
| 845 | assert_eq!(retrieved.content_range(), 10..20); |
| 846 | } |
| 847 | |
| 848 | // Extension Methods Tests |
| 849 |
nothing calls this directly
no test coverage detected