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

Function test_dedup_removes_existing

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

dedup_learningsFunction · 0.85

Tested by

no test coverage detected