Skip to content

Commit 4ef3313

Browse files
committed
Updating tests for the expected behavior
1 parent 2a60fc2 commit 4ef3313

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

query/encode_test.go

+13
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,15 @@ type D struct {
203203
C string
204204
}
205205

206+
type e struct {
207+
B
208+
C string
209+
}
210+
211+
type F struct {
212+
e
213+
}
214+
206215
func TestValues_embeddedStructs(t *testing.T) {
207216
tests := []struct {
208217
in interface{}
@@ -216,6 +225,10 @@ func TestValues_embeddedStructs(t *testing.T) {
216225
D{B: B{C: "bar"}, C: "foo"},
217226
url.Values{"C": {"foo", "bar"}},
218227
},
228+
{
229+
F{e{B: B{C: "bar"}, C: "foo"}}, // With unexported embed
230+
url.Values{"C": {"foo", "bar"}},
231+
},
219232
}
220233

221234
for i, tt := range tests {

0 commit comments

Comments
 (0)