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

Function test_dedup_removes_existing

atomic-agent/src/learnings.rs:855–868  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

853
854 #[test]
855 fn test_dedup_removes_existing() {
856 let existing = format!(
857 "{}\n### Repo\n- Already here\n{}",
858 SECTION_START, SECTION_END
859 );
860 let learnings = Learnings {
861 repo: vec!["Already here".into(), "New one".into()],
862 code: vec![],
863 workflow: vec![],
864 };
865 let deduped = dedup_learnings(&existing, &learnings);
866 assert_eq!(deduped.repo.len(), 1);
867 assert_eq!(deduped.repo[0], "New one");
868 }
869
870 #[test]
871 fn test_dedup_all_duplicates() {

Callers

nothing calls this directly

Calls 1

dedup_learningsFunction · 0.85

Tested by

no test coverage detected