(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func 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 | |
| 71 | func TestComputeScope(t *testing.T) { |
| 72 | tests := []struct { |
nothing calls this directly
no test coverage detected