isPathSuccessful checks if actual tool calls match a specific expected path
(expected []models.ExpectedToolCall, actual []models.ActualToolCall)
| 212 | |
| 213 | // isPathSuccessful checks if actual tool calls match a specific expected path |
| 214 | func (tr *TestRunner) isPathSuccessful(expected []models.ExpectedToolCall, actual []models.ActualToolCall) bool { |
| 215 | // First check: exact count match |
| 216 | if len(actual) != len(expected) { |
| 217 | return false |
| 218 | } |
| 219 | |
| 220 | // Second check: all expected tools must be called correctly in order |
| 221 | for i, expectedTool := range expected { |
| 222 | if i >= len(actual) || !tr.isToolCallCorrect(expectedTool, actual[i]) { |
| 223 | return false |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | return true |
| 228 | } |
| 229 | |
| 230 | // isToolCallCorrect checks if an actual tool call matches an expected one |
| 231 | func (tr *TestRunner) isToolCallCorrect(expected models.ExpectedToolCall, actual models.ActualToolCall) bool { |
no test coverage detected