TestRunBatch_EmptyScorers 测试空评分器
(t *testing.T)
| 221 | |
| 222 | // TestRunBatch_EmptyScorers 测试空评分器 |
| 223 | func TestRunBatch_EmptyScorers(t *testing.T) { |
| 224 | testCases := []*BatchTestCase{ |
| 225 | {ID: "case1", Input: &TextEvalInput{Answer: "测试"}}, |
| 226 | } |
| 227 | |
| 228 | cfg := &BatchConfig{ |
| 229 | TestCases: testCases, |
| 230 | Scorers: []Scorer{}, |
| 231 | Concurrency: 1, |
| 232 | } |
| 233 | |
| 234 | _, err := RunBatch(context.Background(), cfg) |
| 235 | if err == nil { |
| 236 | t.Error("RunBatch() should return error for empty scorers") |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | // TestRunBatch_WithMetadata 测试带元数据的批量评估 |
| 241 | func TestRunBatch_WithMetadata(t *testing.T) { |