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

Function test_clone

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

Source from the content-addressed store, hash-verified

700
701 #[test]
702 fn test_clone() {
703 let store = MemoryChangeStore::new();
704 let change = create_test_change("Clone test", b"data");
705 let hash = change.hash().unwrap();
706 store.insert(hash, change);
707
708 let cloned = store.clone();
709
710 assert!(cloned.has_change(&hash));
711 assert_eq!(cloned.len(), 1);
712
713 // Modifications to clone don't affect original
714 cloned.clear();
715 assert!(store.has_change(&hash));
716 }
717
718 #[test]
719 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