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

Function test_hash_creates_unique_positions

atomic-core/src/apply/position.rs:448–458  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

446
447 #[test]
448 fn test_hash_creates_unique_positions() {
449 let hash1 = Hash::of(b"change 1");
450 let hash2 = Hash::of(b"change 2");
451
452 let pos1 = make_external_position(Some(hash1), 0);
453 let pos2 = make_external_position(Some(hash2), 0);
454
455 // Same position offset but different changes
456 assert_ne!(pos1.change, pos2.change);
457 assert_eq!(pos1.pos, pos2.pos);
458 }
459
460 #[test]
461 fn test_position_with_different_offsets() {

Callers

nothing calls this directly

Calls 1

make_external_positionFunction · 0.85

Tested by

no test coverage detected