MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestClassifyIntent_TieBreaking

Function TestClassifyIntent_TieBreaking

cmd/intent_test.go:58–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestClassifyIntent_TieBreaking(t *testing.T) {
59 // "failing test" matches both bugfix ("failing") and test ("test") —
60 // result must be deterministic across runs (categoryDefs order wins)
61 results := make(map[string]int)
62 for i := 0; i < 20; i++ {
63 intent := classifyIntent("failing test in hooks.go", nil, nil, config.ProjectConfig{})
64 results[intent.Category]++
65 }
66 if len(results) != 1 {
67 t.Errorf("expected deterministic category across 20 runs, got %v", results)
68 }
69}
70
71func TestComputeScope(t *testing.T) {
72 tests := []struct {

Callers

nothing calls this directly

Calls 1

classifyIntentFunction · 0.85

Tested by

no test coverage detected