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

Function sample_evidence

atomic-repository/src/record/move_evidence.rs:316–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314 use super::*;
315
316 fn sample_evidence() -> MoveEvidence {
317 let mut evidence = MoveEvidence::new();
318 evidence.insert_authoritative(AuthoritativeMove::new(
319 "src/old.rs",
320 "src/new.rs",
321 Inode::new(7),
322 MoveAuthority::StableInodeProjection,
323 ));
324 evidence.insert_probable(ProbableMove::new(
325 "assets/old.bin",
326 "assets/new.bin",
327 Inode::new(9),
328 9_750,
329 MoveBasis::ByteIdentity,
330 ));
331 evidence.insert_loss(LossNote::rename_unresolved([
332 RenameCandidate::new("src/a.rs", "src/c.rs", 8_200, MoveBasis::ContentSimilarity),
333 RenameCandidate::new("src/b.rs", "src/c.rs", 8_200, MoveBasis::ContentSimilarity),
334 ]));
335 evidence
336 }
337
338 #[test]
339 fn move_evidence_roundtrips_through_change_unhashed() {

Calls 3

insert_authoritativeMethod · 0.80
insert_probableMethod · 0.80
insert_lossMethod · 0.80