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

Function test_clone

atomic-core/src/change/store.rs:678–692  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

676
677 #[test]
678 fn test_clone() {
679 let store = MemoryChangeStore::new();
680 let change = create_test_change("Clone test", b"data");
681 let hash = change.hash().unwrap();
682 store.insert(hash, change);
683
684 let cloned = store.clone();
685
686 assert!(cloned.has_change(&hash));
687 assert_eq!(cloned.len(), 1);
688
689 // Modifications to clone don't affect original
690 cloned.clear();
691 assert!(store.has_change(&hash));
692 }
693
694 #[test]
695 fn test_debug() {

Callers

nothing calls this directly

Calls 6

create_test_changeFunction · 0.70
clearMethod · 0.65
unwrapMethod · 0.45
hashMethod · 0.45
insertMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected