Skip to content

Commit afd52ea

Browse files
committed
re-add test case for slices of pointer values
1 parent 1edf4fb commit afd52ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

query/encode_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ func TestValues_Pointers(t *testing.T) {
9494
{struct{ V *string }{&str}, url.Values{"V": {"s"}}},
9595
{struct{ V **string }{&strPtr}, url.Values{"V": {"s"}}},
9696

97+
// slices of pointer values
98+
{struct{ V []*string }{}, url.Values{}},
99+
{struct{ V []*string }{[]*string{&str, &str}}, url.Values{"V": {"s", "s"}}},
100+
97101
// pointer values for the input struct itself
98102
{(*struct{})(nil), url.Values{}},
99103
{&struct{}{}, url.Values{}},

0 commit comments

Comments
 (0)