Added tests for slice in response

This commit is contained in:
Aleksandr Petrukhin
2016-07-15 18:21:20 +03:00
parent 66a279264f
commit 8b05604eb9
+6
View File
@@ -246,6 +246,8 @@ type Structs struct {
AnonymousSlice []struct{ V int }
AnonymousPtrSlice []*struct{ V int }
Slice []string
unexported bool
}
@@ -282,6 +284,8 @@ var structsValue = Structs{
AnonymousSlice: []struct{ V int }{{1}, {2}},
AnonymousPtrSlice: []*struct{ V int }{{3}, {4}},
Slice: []string{"test5", "test6"},
}
var structsString = "{" +
@@ -306,6 +310,8 @@ var structsString = "{" +
`"AnonymousSlice":[{"V":1},{"V":2}],` +
`"AnonymousPtrSlice":[{"V":3},{"V":4}],` +
`"Slice":["test5","test6"],` +
// Embedded fields go last.
`"V":"subp",` +
`"Value":"test"` +