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

Source from the content-addressed store, hash-verified

1035
1036 #[test]
1037 fn test_turn_changes_merge_no_duplicates() {
1038 let mut a =
1039 TurnChanges::new().with_modified(vec![PathBuf::from("a.rs"), PathBuf::from("b.rs")]);
1040 let b =
1041 TurnChanges::new().with_modified(vec![PathBuf::from("b.rs"), PathBuf::from("c.rs")]);
1042 a.merge(&b);
1043 // b.rs should not be duplicated
1044 assert_eq!(a.modified.len(), 3);
1045 assert!(a.modified.contains(&PathBuf::from("a.rs")));
1046 assert!(a.modified.contains(&PathBuf::from("b.rs")));
1047 assert!(a.modified.contains(&PathBuf::from("c.rs")));
1048 }
1049
1050 #[test]
1051 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