MCPcopy Index your code
hub / github.com/AI45Lab/Code / loop_with_empty_initial_runs_nothing

Function loop_with_empty_initial_runs_nothing

core/src/orchestration/combinators.rs:778–788  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

776
777 #[tokio::test]
778 async fn loop_with_empty_initial_runs_nothing() {
779 let exec: Arc<dyn AgentExecutor> = Arc::new(EchoExecutor::new());
780 let mut called = false;
781 let out = crate::orchestration::execute_loop(exec, vec![], 5, None, |_| {
782 called = true;
783 LoopDecision::Stop
784 })
785 .await;
786 assert!(out.is_empty());
787 assert!(!called, "predicate is not invoked when there is no work");
788 }
789
790 #[tokio::test]
791 async fn loop_stops_when_predicate_requests_no_further_specs() {

Callers

nothing calls this directly

Calls 1

execute_loopFunction · 0.85

Tested by

no test coverage detected