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

Function change_store_failure_propagates

atomic-core/src/merge/engine.rs:842–854  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

840
841 #[test]
842 fn change_store_failure_propagates() {
843 let mut txn = MockTxn::new();
844 let id = NodeId::new(1);
845 txn.register(id, Hash::of(b"missing change"));
846 let store = MemoryChangeStore::new();
847 let engine = SemanticMergeEngine::new(&txn, &store);
848 let vertex = GraphNode::new(id, ChangePosition::new(0), ChangePosition::new(5));
849
850 let error = engine
851 .try_merge(&ConflictGroup::new(vec![vertex]))
852 .expect_err("change-store failure must propagate");
853 assert!(matches!(error, SemanticMergeError::ChangeStore(_)));
854 }
855
856 #[test]
857 fn ancestor_graph_failure_propagates() {

Callers

nothing calls this directly

Calls 2

registerMethod · 0.45
try_mergeMethod · 0.45

Tested by

no test coverage detected