MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_mark_leaf_deleted

Function test_mark_leaf_deleted

atomic-core/src/crdt/apply/traits.rs:933–944  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

931
932 #[test]
933 fn test_mark_leaf_deleted() {
934 let mut txn = MockCrdtTxn::new();
935 let branch_id = BranchId::new(NodeId::new(1), 0);
936 let leaf_id = LeafId::new(NodeId::new(1), 0);
937
938 txn.create_leaf(leaf_id, branch_id, TokenKind::Word, 0..5, None)
939 .unwrap();
940 txn.mark_leaf_deleted(leaf_id).unwrap();
941
942 let leaf = txn.get_leaf(leaf_id).unwrap().unwrap();
943 assert!(leaf.state().is_deleted());
944 }
945
946 #[test]
947 fn test_alloc_inode() {

Callers

nothing calls this directly

Calls 4

create_leafMethod · 0.80
mark_leaf_deletedMethod · 0.80
unwrapMethod · 0.45
get_leafMethod · 0.45

Tested by

no test coverage detected