Skip to content

Commit 3a658e3

Browse files
committed
test: drop paramsKeys aliasing no longer needed
1 parent a715012 commit 3a658e3

2 files changed

Lines changed: 0 additions & 8 deletions

File tree

context_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ func TestContext_Clone(t *testing.T) {
209209
c := newTextContextOnly(f, httptest.NewRecorder(), req)
210210
c.route = &Route{params: []string{"a"}}
211211
*c.params = []string{"a"}
212-
*c.paramsKeys = c.route.params
213212

214213
buf := []byte("foo bar")
215214
_, err := c.w.Write(buf)
@@ -233,7 +232,6 @@ func TestContext_CloneWith(t *testing.T) {
233232
c := newTextContextOnly(f, w, req)
234233
c.route = &Route{params: []string{"a"}}
235234
*c.params = []string{"a"}
236-
*c.paramsKeys = c.route.params
237235

238236
cp := c.CloneWith(c.Writer(), c.Request())
239237
assert.Equal(t, slices.Collect(c.Params()), slices.Collect(cp.Params()))

tree_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,6 @@ func Test_iTree_lookup_Domain(t *testing.T) {
12321232
assert.Equal(t, tc.wantPath, n.routes[idx].pattern.str)
12331233
assert.Equal(t, tc.wantTsr, tsr)
12341234
c.route = n.routes[idx]
1235-
*c.paramsKeys = c.route.params
12361235
assert.Equal(t, tc.wantParams, slices.Collect(c.Params()))
12371236
})
12381237
}
@@ -1503,7 +1502,6 @@ func Test_iTree_lookup_Matchers(t *testing.T) {
15031502
assert.Equal(t, tc.wantPattern, n.routes[idx].pattern.str)
15041503
assert.Equal(t, tc.wantTsr, tsr)
15051504
c.route = n.routes[idx]
1506-
*c.paramsKeys = c.route.params
15071505
assert.Equal(t, tc.wantParams, slices.Collect(c.Params()))
15081506
})
15091507
}
@@ -1649,7 +1647,6 @@ func Test_iTree_lookup_MatchersPriority(t *testing.T) {
16491647
assert.Equal(t, tc.wantPattern, n.routes[idx].pattern.str)
16501648
assert.Equal(t, tc.wantMatcher, n.routes[idx].matchers)
16511649
c.route = n.routes[idx]
1652-
*c.paramsKeys = c.route.params
16531650
assert.Equal(t, tc.wantParams, slices.Collect(c.Params()))
16541651
})
16551652
}
@@ -2927,7 +2924,6 @@ func Test_iTree_lookup_Overlapping(t *testing.T) {
29272924
assert.False(t, tsr)
29282925
assert.Equal(t, tc.wantMatch, n.routes[idx].pattern.str)
29292926
c.route = n.routes[idx]
2930-
*c.paramsKeys = c.route.params
29312927
if len(tc.wantParams) == 0 {
29322928
assert.Empty(t, slices.Collect(c.Params()))
29332929
} else {
@@ -4080,7 +4076,6 @@ func Test_iTree_lookup_InfixWildcard(t *testing.T) {
40804076
assert.Equal(t, tc.wantPath, n.routes[idx].pattern.str)
40814077
assert.Equal(t, tc.wantTsr, tsr)
40824078
c.route = n.routes[idx]
4083-
*c.paramsKeys = c.route.params
40844079
assert.Equal(t, tc.wantParams, slices.Collect(c.Params()))
40854080
})
40864081
}
@@ -4451,7 +4446,6 @@ func Test_iTree_lookup_InfixWildcardTsr(t *testing.T) {
44514446
assert.Equal(t, tc.wantPath, n.routes[idx].pattern.str)
44524447
assert.Equal(t, tc.wantTsr, tsr)
44534448
c.route = n.routes[idx]
4454-
*c.paramsKeys = c.route.params
44554449
assert.Equal(t, tc.wantParams, slices.Collect(c.Params()))
44564450
})
44574451
}

0 commit comments

Comments
 (0)