1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

consolidate more tests

This commit is contained in:
Tao Wen
2018-02-13 20:58:29 +08:00
parent c3b6c1e845
commit 761ce8cce2
18 changed files with 237 additions and 276 deletions

View File

@ -28,6 +28,23 @@ func init() {
(*uint32Alias)(nil),
(*uintptr)(nil),
(*uintptrAlias)(nil),
(*struct {
A int8Alias `json:"a"`
B int16Alias `json:"stream"`
C int32Alias `json:"c"`
D int64Alias `json:"d"`
E uintAlias `json:"e"`
F uint16Alias `json:"f"`
G uint32Alias `json:"g"`
H uint64Alias `json:"h"`
I float32Alias `json:"i"`
J float64Alias `json:"j"`
K stringAlias `json:"k"`
L intAlias `json:"l"`
M uintAlias `json:"m"`
N boolAlias `json:"n"`
O uintptrAlias `json:"o"`
})(nil),
)
}
@ -46,4 +63,7 @@ type ptrStringAlias *string
type uint8Alias uint8
type uint16Alias uint16
type uint32Alias uint32
type uintptrAlias uintptr
type uintptrAlias uintptr
type uintAlias uint
type uint64Alias uint64
type intAlias int

View File

@ -137,6 +137,11 @@ func init() {
F1 uint32 `json:"F1"`
F2 uint32 `json:"F2,string"`
})(nil),
(*struct {
A string `json:"a,omitempty"`
B string `json:"b,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
})(nil),
)
}
@ -193,7 +198,6 @@ type StringFieldName struct {
StringFieldNameE `json:"e"`
}
type StructFieldNameS1 struct {
S1F string
}