()
| 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() { |
nothing calls this directly
no test coverage detected