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

Function test_create_branch

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

Source from the content-addressed store, hash-verified

889
890 #[test]
891 fn test_create_branch() {
892 let mut txn = MockCrdtTxn::new();
893 let trunk_id = TrunkId::new(NodeId::new(1), 0);
894 let branch_id = BranchId::new(NodeId::new(1), 0);
895
896 let branch = txn.create_branch(branch_id, trunk_id, None).unwrap();
897
898 assert_eq!(branch.id(), branch_id);
899 assert_eq!(branch.trunk(), trunk_id);
900 assert!(txn.has_branch(branch_id).unwrap());
901 }
902
903 #[test]
904 fn test_mark_branch_deleted() {

Callers

nothing calls this directly

Calls 2

create_branchMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected