MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_agent_memory_working

Function test_agent_memory_working

core/src/memory.rs:385–394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

383
384 #[tokio::test]
385 async fn test_agent_memory_working() {
386 let memory = AgentMemory::new(Arc::new(InMemoryStore::new()));
387 memory
388 .add_to_working(MemoryItem::new("task").with_type(MemoryType::Working))
389 .await
390 .unwrap();
391 assert_eq!(memory.working_count().await, 1);
392 memory.clear_working().await;
393 assert_eq!(memory.working_count().await, 0);
394 }
395
396 #[tokio::test]
397 async fn test_agent_memory_working_overflow_trims() {

Callers

nothing calls this directly

Calls 2

add_to_workingMethod · 0.80
clear_workingMethod · 0.45

Tested by

no test coverage detected