| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
package maprange_test |
| 6 |
|
| 7 |
import ( |
| 8 |
"golang.org/x/tools/go/analysis/analysistest" |
| 9 |
"golang.org/x/tools/gopls/internal/analysis/maprange" |
| 10 |
"golang.org/x/tools/internal/testfiles" |
| 11 |
"path/filepath" |
| 12 |
"testing" |
| 13 |
) |
| 14 |
|
| 15 |
func TestBasic(t *testing.T) { |
| 16 |
dir := testfiles.ExtractTxtarFileToTmp(t, filepath.Join(analysistest.TestData(), "basic.txtar")) |
| 17 |
analysistest.RunWithSuggestedFixes(t, dir, maprange.Analyzer, "maprange") |
| 18 |
} |
| 19 |
|
| 20 |
func TestOld(t *testing.T) { |
| 21 |
dir := testfiles.ExtractTxtarFileToTmp(t, filepath.Join(analysistest.TestData(), "old.txtar")) |
| 22 |
analysistest.RunWithSuggestedFixes(t, dir, maprange.Analyzer, "maprange") |
| 23 |
} |