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

Function create_test_change

atomic-core/src/change/store.rs:556–561  ·  view source on GitHub ↗
(message: &str, content: &[u8])

Source from the content-addressed store, hash-verified

554 use crate::types::ChangePosition;
555
556 fn create_test_change(message: &str, content: &[u8]) -> Change {
557 let mut change = Change::empty(ChangeHeader::new(message));
558 change.contents = content.to_vec();
559 change.finalize();
560 change
561 }
562
563 // ------------------------------------------------------------------------
564 // MemoryStoreError Tests

Callers 15

test_insert_and_getFunction · 0.70
test_removeFunction · 0.70
test_clearFunction · 0.70
test_hashesFunction · 0.70
test_cloneFunction · 0.70
test_has_contentsFunction · 0.70
test_get_headerFunction · 0.70
test_get_contents_basicFunction · 0.70

Calls 1

finalizeMethod · 0.45

Tested by 15

test_insert_and_getFunction · 0.56
test_removeFunction · 0.56
test_clearFunction · 0.56
test_hashesFunction · 0.56
test_cloneFunction · 0.56
test_has_contentsFunction · 0.56
test_get_headerFunction · 0.56
test_get_contents_basicFunction · 0.56