MCPcopy Create free account
hub / github.com/astercloud/aster / TestRunBatch_EmptyTestCases

Function TestRunBatch_EmptyTestCases

pkg/evals/batch_test.go:207–220  ·  view source on GitHub ↗

TestRunBatch_EmptyTestCases 测试空测试用例

(t *testing.T)

Source from the content-addressed store, hash-verified

205
206// TestRunBatch_EmptyTestCases 测试空测试用例
207func 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 测试空评分器
223func TestRunBatch_EmptyScorers(t *testing.T) {

Callers

nothing calls this directly

Calls 3

NewFaithfulnessScorerFunction · 0.85
RunBatchFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected