Skip to content

Commit 3d774df

Browse files
committed
tests: update tests
1 parent 8f40032 commit 3d774df

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

pkg/golinters/exptostd/testdata/exptostd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package testdata
44
import (
55
"fmt"
66

7-
"golang.org/x/exp/maps"
8-
"golang.org/x/exp/slices"
7+
"golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
8+
"golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
99
)
1010

1111
func _(m, a map[string]string) {

pkg/golinters/exptostd/testdata/exptostd_cgo.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
"fmt"
1616
"unsafe"
1717

18-
"golang.org/x/exp/maps"
19-
"golang.org/x/exp/slices"
18+
"golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
19+
"golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
2020
)
2121

2222
func _() {

pkg/golinters/exptostd/testdata/exptostd_go123.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ package testdata
66
import (
77
"fmt"
88

9-
"golang.org/x/exp/maps"
10-
"golang.org/x/exp/slices"
9+
"golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
10+
"golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
1111
)
1212

1313
func _(m, a map[string]string) {
1414
maps.Clone(m) // want `golang.org/x/exp/maps.Clone\(\) can be replaced by maps.Clone\(\)`
1515

1616
maps.Keys(m) // want `golang.org/x/exp/maps.Keys\(\) can be replaced by slices.Collect\(maps.Keys\(\)\)`
1717

18-
maps.Values(m) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Keys\(\)\)`
18+
maps.Values(m) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Values\(\)\)`
1919

2020
maps.Equal(m, a) // want `golang.org/x/exp/maps.Equal\(\) can be replaced by maps.Equal\(\)`
2121

pkg/golinters/exptostd/testdata/exptostd_go123_cgo.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
"fmt"
1818
"unsafe"
1919

20-
"golang.org/x/exp/maps"
21-
"golang.org/x/exp/slices"
20+
"golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
21+
"golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
2222
)
2323

2424
func _() {
@@ -32,7 +32,7 @@ func _(m, a map[string]string) {
3232

3333
maps.Keys(m) // want `golang.org/x/exp/maps.Keys\(\) can be replaced by slices.Collect\(maps.Keys\(\)\)`
3434

35-
maps.Values(m) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Keys\(\)\)`
35+
maps.Values(m) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Values\(\)\)`
3636

3737
maps.Equal(m, a) // want `golang.org/x/exp/maps.Equal\(\) can be replaced by maps.Equal\(\)`
3838

pkg/golinters/exptostd/testdata/fix/in/exptostd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package testdata
44
import (
55
"fmt"
66

7-
"golang.org/x/exp/maps"
8-
"golang.org/x/exp/slices"
7+
"golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
8+
"golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
99
)
1010

1111
func _(m, a map[string]string) {

pkg/golinters/exptostd/testdata/fix/out/exptostd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package testdata
44
import (
55
"fmt"
66

7-
"maps"
8-
"slices"
7+
"maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
8+
"slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
99
)
1010

1111
func _(m, a map[string]string) {

0 commit comments

Comments
 (0)