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:1427–1438  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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