(t *testing.T)
| 175 | } |
| 176 | |
| 177 | func TestMatchModelPattern(t *testing.T) { |
| 178 | tests := []struct { |
| 179 | pattern, model string |
| 180 | want bool |
| 181 | }{ |
| 182 | {"*", "gpt-4", true}, |
| 183 | {"gpt-*", "gpt-4", true}, |
| 184 | {"gpt-*", "claude-3", false}, |
| 185 | {"*-pro", "gemini-2.5-pro", true}, |
| 186 | {"claude-*-opus", "claude-3-opus", true}, |
| 187 | {"", "gpt-4", false}, |
| 188 | } |
| 189 | for _, tt := range tests { |
| 190 | if got := matchModelPattern(tt.pattern, tt.model); got != tt.want { |
| 191 | t.Errorf("matchModelPattern(%q, %q) = %v, want %v", tt.pattern, tt.model, got, tt.want) |
| 192 | } |
| 193 | } |
| 194 | } |
nothing calls this directly
no test coverage detected