TestRunBatch_EmptyTestCases 测试空测试用例
(t *testing.T)
| 205 | |
| 206 | // TestRunBatch_EmptyTestCases 测试空测试用例 |
| 207 | func TestRunBatch_EmptyTestCases(t *testing.T) { |
| 208 | mockProvider := &MockProvider{response: `{"score": 0.5}`} |
| 209 | |
| 210 | cfg := &BatchConfig{ |
| 211 | TestCases: []*BatchTestCase{}, |
| 212 | Scorers: []Scorer{NewFaithfulnessScorer(mockProvider)}, |
| 213 | Concurrency: 1, |
| 214 | } |
| 215 | |
| 216 | _, err := RunBatch(context.Background(), cfg) |
| 217 | if err == nil { |
| 218 | t.Error("RunBatch() should return error for empty test cases") |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | // TestRunBatch_EmptyScorers 测试空评分器 |
| 223 | func TestRunBatch_EmptyScorers(t *testing.T) { |
nothing calls this directly
no test coverage detected