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

Function test_clone

atomic-core/src/change/format_v3/hash_table.rs:1233–1241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1231
1232 #[test]
1233 fn test_clone() {
1234 let mut original = HashDedupTable::new(make_hash(0));
1235 original.insert(make_hash(1)).unwrap();
1236
1237 let cloned = original.clone();
1238 assert_eq!(cloned.len(), 2);
1239 assert_eq!(cloned.resolve(0), original.resolve(0));
1240 assert_eq!(cloned.resolve(1), original.resolve(1));
1241 }
1242
1243 // ── Edge cases ─────────────────────────────────────────────────
1244

Callers

nothing calls this directly

Calls 4

make_hashFunction · 0.70
unwrapMethod · 0.45
insertMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected