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

Function test_turn_changes_merge_no_duplicates

atomic-agent/src/event.rs:1428–1439  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1426
1427 #[test]
1428 fn test_turn_changes_merge_no_duplicates() {
1429 let mut a =
1430 TurnChanges::new().with_modified(vec![PathBuf::from("a.rs"), PathBuf::from("b.rs")]);
1431 let b =
1432 TurnChanges::new().with_modified(vec![PathBuf::from("b.rs"), PathBuf::from("c.rs")]);
1433 a.merge(&b);
1434 // b.rs should not be duplicated
1435 assert_eq!(a.modified.len(), 3);
1436 assert!(a.modified.contains(&PathBuf::from("a.rs")));
1437 assert!(a.modified.contains(&PathBuf::from("b.rs")));
1438 assert!(a.modified.contains(&PathBuf::from("c.rs")));
1439 }
1440
1441 #[test]
1442 fn test_turn_changes_merge_takes_later_timestamp() {

Callers

nothing calls this directly

Calls 2

with_modifiedMethod · 0.80
mergeMethod · 0.45

Tested by

no test coverage detected