MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / TestMatchModelPattern

Function TestMatchModelPattern

internal/toolinjection/injection_test.go:177–194  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

175}
176
177func 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}

Callers

nothing calls this directly

Calls 1

matchModelPatternFunction · 0.70

Tested by

no test coverage detected