MCPcopy Create free account
hub / github.com/github/gh-aw / TestValidateEffortParam

Function TestValidateEffortParam

pkg/workflow/model_alias_validation_test.go:171–193  ·  view source on GitHub ↗

─── ValidateEffortParam ──────────────────────────────────────────────────────

(t *testing.T)

Source from the content-addressed store, hash-verified

169// ─── ValidateEffortParam ──────────────────────────────────────────────────────
170
171func TestValidateEffortParam(t *testing.T) {
172 tests := []struct {
173 value string
174 wantErr bool
175 }{
176 {"low", false},
177 {"medium", false},
178 {"high", false},
179 {"extreme", true},
180 {"HIGH", true},
181 {"", true},
182 }
183 for _, tt := range tests {
184 t.Run(tt.value, func(t *testing.T) {
185 err := ValidateEffortParam(tt.value)
186 if tt.wantErr {
187 assert.Error(t, err, "effort=%q should fail validation", tt.value)
188 } else {
189 assert.NoError(t, err, "effort=%q should pass validation", tt.value)
190 }
191 })
192 }
193}
194
195// ─── ValidateTemperatureParam ─────────────────────────────────────────────────
196

Callers

nothing calls this directly

Calls 3

ValidateEffortParamFunction · 0.85
RunMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected