| 1 | // Copyright 2023 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package httpmuxscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/passes/httpmux`/ |
| 6 | |
| 7 | import ( |
| 8 | "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/" |
| 9 | |
| 10 | "golang.org/x/tools/go/analysis/analysistestscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/analysistest`/" |
| 11 | ) |
| 12 | |
| 13 | func Testscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/passes/httpmux`/Test().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 14 | testdata := analysistestscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/analysistest`/.TestDatascip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/analysistest`/TestData.() |
| 15 | tests := []string{"a"} |
| 16 | inTestscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/passes/httpmux`/inTest. = true |
| 17 | analysistestscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/analysistest`/.Runscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/analysistest`/Run().(t, testdata, Analyzerscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/passes/httpmux`/Analyzer., tests...) |
| 18 | } |
| 19 | |
| 20 | func TestGoVersionscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/passes/httpmux`/TestGoVersion().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 21 | for _, test := range []struct { |
| 22 | in string |
| 23 | want bool |
| 24 | }{ |
| 25 | {"", true}, |
| 26 | {"go1", false}, |
| 27 | {"go1.21", false}, |
| 28 | {"go1.21rc3", false}, |
| 29 | {"go1.22", true}, |
| 30 | {"go1.22rc1", true}, |
| 31 | } { |
| 32 | got := goVersionAfter121scip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/passes/httpmux`/goVersionAfter121().(test.in) |
| 33 | if got != test.want { |
| 34 | t.Errorfscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Errorf().("%q: got %t, want %t", test.in, got, test.want) |
| 35 | } |
| 36 | } |
| 37 | } |