File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package encode
22
33import (
44 "net/http"
5+ "slices"
56 "sync"
67 "testing"
78)
@@ -112,7 +113,7 @@ func TestPreferOrder(t *testing.T) {
112113 }
113114 enc .Prefer = test .prefer
114115 result := AcceptedEncodings (r , enc .Prefer )
115- if ! sliceEqual (result , test .expected ) {
116+ if ! slices . Equal (result , test .expected ) {
116117 t .Errorf ("AcceptedEncodings() actual: %s expected: %s" ,
117118 result ,
118119 test .expected )
@@ -121,17 +122,6 @@ func TestPreferOrder(t *testing.T) {
121122 }
122123}
123124
124- func sliceEqual (a , b []string ) bool {
125- if len (a ) != len (b ) {
126- return false
127- }
128- for i := range a {
129- if a [i ] != b [i ] {
130- return false
131- }
132- }
133- return true
134- }
135125
136126func TestValidate (t * testing.T ) {
137127 type testCase struct {
You can’t perform that action at this time.
0 commit comments