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

Source from the content-addressed store, hash-verified

1043
1044 #[test]
1045 fn test_turn_changes_merge_no_duplicates() {
1046 let mut a =
1047 TurnChanges::new().with_modified(vec![PathBuf::from("a.rs"), PathBuf::from("b.rs")]);
1048 let b =
1049 TurnChanges::new().with_modified(vec![PathBuf::from("b.rs"), PathBuf::from("c.rs")]);
1050 a.merge(&b);
1051 // b.rs should not be duplicated
1052 assert_eq!(a.modified.len(), 3);
1053 assert!(a.modified.contains(&PathBuf::from("a.rs")));
1054 assert!(a.modified.contains(&PathBuf::from("b.rs")));
1055 assert!(a.modified.contains(&PathBuf::from("c.rs")));
1056 }
1057
1058 #[test]
1059 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