Skip to content

Commit 5014110

Browse files
committed
add tests for embedded struct pointer
Refs #40
1 parent e9ef1ee commit 5014110

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

query/encode_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ func TestValues_EmbeddedStructs(t *testing.T) {
356356
type Outer struct {
357357
Inner
358358
}
359+
type OuterPtr struct {
360+
*Inner
361+
}
359362
type Mixed struct {
360363
Inner
361364
V string
@@ -376,6 +379,10 @@ func TestValues_EmbeddedStructs(t *testing.T) {
376379
Outer{Inner{V: "a"}},
377380
url.Values{"V": {"a"}},
378381
},
382+
{
383+
OuterPtr{&Inner{V: "a"}},
384+
url.Values{"V": {"a"}},
385+
},
379386
{
380387
Mixed{Inner: Inner{V: "a"}, V: "b"},
381388
url.Values{"V": {"b", "a"}},

0 commit comments

Comments
 (0)