MCPcopy Create free account
hub / github.com/alibaba/open-code-review / TestParseScanFlags_IntFlags

Function TestParseScanFlags_IntFlags

cmd/opencodereview/scan_cmd_test.go:223–249  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

221}
222
223func TestParseScanFlags_IntFlags(t *testing.T) {
224 opts, err := parseScanFlags([]string{
225 "--concurrency", "16",
226 "--timeout", "20",
227 "--max-tools", "50",
228 "--max-git-procs", "32",
229 "--max-tokens-budget", "100000",
230 })
231 if err != nil {
232 t.Fatalf("unexpected error: %v", err)
233 }
234 if opts.concurrency != 16 {
235 t.Errorf("concurrency = %d", opts.concurrency)
236 }
237 if opts.perFileTimeout != 20 {
238 t.Errorf("perFileTimeout = %d", opts.perFileTimeout)
239 }
240 if opts.maxTools != 50 {
241 t.Errorf("maxTools = %d", opts.maxTools)
242 }
243 if opts.maxGitProcs != 32 {
244 t.Errorf("maxGitProcs = %d", opts.maxGitProcs)
245 }
246 if opts.maxTokensBudget != 100000 {
247 t.Errorf("maxTokensBudget = %d", opts.maxTokensBudget)
248 }
249}

Callers

nothing calls this directly

Calls 1

parseScanFlagsFunction · 0.85

Tested by

no test coverage detected