Add test case for float32 type

This commit is contained in:
Masaaki Goshima 2021-05-08 22:38:38 +09:00
parent e570e5774f
commit 3fa9900acb
1 changed files with 547 additions and 1 deletions

View File

@ -17,6 +17,9 @@ func TestCoverFloat32(t *testing.T) {
type structFloat32String struct {
A float32 `json:"a,string"`
}
type structFloat32StringOmitEmpty struct {
A float32 `json:"a,string,omitempty"`
}
type structFloat32Ptr struct {
A *float32 `json:"a"`
@ -27,6 +30,9 @@ func TestCoverFloat32(t *testing.T) {
type structFloat32PtrString struct {
A *float32 `json:"a,string"`
}
type structFloat32PtrStringOmitEmpty struct {
A *float32 `json:"a,string,omitempty"`
}
tests := []struct {
name string
@ -72,6 +78,12 @@ func TestCoverFloat32(t *testing.T) {
A float32 `json:"a,string"`
}{},
},
{
name: "HeadFloat32ZeroStringOmitEmpty",
data: struct {
A float32 `json:"a,string,omitempty"`
}{},
},
// HeadFloat32
{
@ -92,6 +104,12 @@ func TestCoverFloat32(t *testing.T) {
A float32 `json:"a,string"`
}{A: 1},
},
{
name: "HeadFloat32StringOmitEmpty",
data: struct {
A float32 `json:"a,string,omitempty"`
}{A: 1},
},
// HeadFloat32Ptr
{
@ -112,6 +130,12 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
}{A: float32ptr(1)},
},
{
name: "HeadFloat32PtrStringOmitEmpty",
data: struct {
A *float32 `json:"a,string,omitempty"`
}{A: float32ptr(1)},
},
// HeadFloat32PtrNil
{
@ -132,6 +156,12 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
}{A: nil},
},
{
name: "HeadFloat32PtrNilStringOmitEmpty",
data: struct {
A *float32 `json:"a,string,omitempty"`
}{A: nil},
},
// PtrHeadFloat32Zero
{
@ -152,6 +182,12 @@ func TestCoverFloat32(t *testing.T) {
A float32 `json:"a,string"`
}{},
},
{
name: "PtrHeadFloat32ZeroStringOmitEmpty",
data: &struct {
A float32 `json:"a,string,omitempty"`
}{},
},
// PtrHeadFloat32
{
@ -172,6 +208,12 @@ func TestCoverFloat32(t *testing.T) {
A float32 `json:"a,string"`
}{A: 1},
},
{
name: "PtrHeadFloat32StringOmitEmpty",
data: &struct {
A float32 `json:"a,string,omitempty"`
}{A: 1},
},
// PtrHeadFloat32Ptr
{
@ -192,6 +234,12 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
}{A: float32ptr(1)},
},
{
name: "PtrHeadFloat32PtrStringOmitEmpty",
data: &struct {
A *float32 `json:"a,string,omitempty"`
}{A: float32ptr(1)},
},
// PtrHeadFloat32PtrNil
{
@ -212,6 +260,12 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
}{A: nil},
},
{
name: "PtrHeadFloat32PtrNilStringOmitEmpty",
data: &struct {
A *float32 `json:"a,string,omitempty"`
}{A: nil},
},
// PtrHeadFloat32Nil
{
@ -232,6 +286,12 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
})(nil),
},
{
name: "PtrHeadFloat32NilStringOmitEmpty",
data: (*struct {
A *float32 `json:"a,string,omitempty"`
})(nil),
},
// HeadFloat32ZeroMultiFields
{
@ -251,13 +311,21 @@ func TestCoverFloat32(t *testing.T) {
}{},
},
{
name: "HeadFloat32ZeroMultiFields",
name: "HeadFloat32ZeroMultiFieldsString",
data: struct {
A float32 `json:"a,string"`
B float32 `json:"b,string"`
C float32 `json:"c,string"`
}{},
},
{
name: "HeadFloat32ZeroMultiFieldsStringOmitEmpty",
data: struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
C float32 `json:"c,string,omitempty"`
}{},
},
// HeadFloat32MultiFields
{
@ -284,6 +352,14 @@ func TestCoverFloat32(t *testing.T) {
C float32 `json:"c,string"`
}{A: 1, B: 2, C: 3},
},
{
name: "HeadFloat32MultiFieldsStringOmitEmpty",
data: struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
C float32 `json:"c,string,omitempty"`
}{A: 1, B: 2, C: 3},
},
// HeadFloat32PtrMultiFields
{
@ -310,6 +386,14 @@ func TestCoverFloat32(t *testing.T) {
C *float32 `json:"c,string"`
}{A: float32ptr(1), B: float32ptr(2), C: float32ptr(3)},
},
{
name: "HeadFloat32PtrMultiFieldsStringOmitEmpty",
data: struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
C *float32 `json:"c,string,omitempty"`
}{A: float32ptr(1), B: float32ptr(2), C: float32ptr(3)},
},
// HeadFloat32PtrNilMultiFields
{
@ -336,6 +420,14 @@ func TestCoverFloat32(t *testing.T) {
C *float32 `json:"c,string"`
}{A: nil, B: nil, C: nil},
},
{
name: "HeadFloat32PtrNilMultiFieldsStringOmitEmpty",
data: struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
C *float32 `json:"c,string,omitempty"`
}{A: nil, B: nil, C: nil},
},
// PtrHeadFloat32ZeroMultiFields
{
@ -359,6 +451,13 @@ func TestCoverFloat32(t *testing.T) {
B float32 `json:"b,string"`
}{},
},
{
name: "PtrHeadFloat32ZeroMultiFieldsStringOmitEmpty",
data: &struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}{},
},
// PtrHeadFloat32MultiFields
{
@ -382,6 +481,13 @@ func TestCoverFloat32(t *testing.T) {
B float32 `json:"b,string"`
}{A: 1, B: 2},
},
{
name: "PtrHeadFloat32MultiFieldsStringOmitEmpty",
data: &struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}{A: 1, B: 2},
},
// PtrHeadFloat32PtrMultiFields
{
@ -405,6 +511,13 @@ func TestCoverFloat32(t *testing.T) {
B *float32 `json:"b,string"`
}{A: float32ptr(1), B: float32ptr(2)},
},
{
name: "PtrHeadFloat32PtrMultiFieldsStringOmitEmpty",
data: &struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}{A: float32ptr(1), B: float32ptr(2)},
},
// PtrHeadFloat32PtrNilMultiFields
{
@ -428,6 +541,13 @@ func TestCoverFloat32(t *testing.T) {
B *float32 `json:"b,string"`
}{A: nil, B: nil},
},
{
name: "PtrHeadFloat32PtrNilMultiFieldsStringOmitEmpty",
data: &struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}{A: nil, B: nil},
},
// PtrHeadFloat32NilMultiFields
{
@ -451,6 +571,13 @@ func TestCoverFloat32(t *testing.T) {
B *float32 `json:"b,string"`
})(nil),
},
{
name: "PtrHeadFloat32NilMultiFieldsStringOmitEmpty",
data: (*struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
})(nil),
},
// HeadFloat32ZeroNotRoot
{
@ -477,6 +604,14 @@ func TestCoverFloat32(t *testing.T) {
}
}{},
},
{
name: "HeadFloat32ZeroNotRootStringOmitEmpty",
data: struct {
A struct {
A float32 `json:"a,string,omitempty"`
}
}{},
},
// HeadFloat32NotRoot
{
@ -509,6 +644,16 @@ func TestCoverFloat32(t *testing.T) {
A float32 `json:"a,string"`
}{A: 1}},
},
{
name: "HeadFloat32NotRootStringOmitEmpty",
data: struct {
A struct {
A float32 `json:"a,string,omitempty"`
}
}{A: struct {
A float32 `json:"a,string,omitempty"`
}{A: 1}},
},
// HeadFloat32PtrNotRoot
{
@ -541,6 +686,16 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
}{float32ptr(1)}},
},
{
name: "HeadFloat32PtrNotRootStringOmitEmpty",
data: struct {
A struct {
A *float32 `json:"a,string,omitempty"`
}
}{A: struct {
A *float32 `json:"a,string,omitempty"`
}{float32ptr(1)}},
},
// HeadFloat32PtrNilNotRoot
{
@ -567,6 +722,14 @@ func TestCoverFloat32(t *testing.T) {
}
}{},
},
{
name: "HeadFloat32PtrNilNotRootStringOmitEmpty",
data: struct {
A struct {
A *float32 `json:"a,string,omitempty"`
}
}{},
},
// PtrHeadFloat32ZeroNotRoot
{
@ -599,6 +762,16 @@ func TestCoverFloat32(t *testing.T) {
A float32 `json:"a,string"`
})},
},
{
name: "PtrHeadFloat32ZeroNotRootStringOmitEmpty",
data: struct {
A *struct {
A float32 `json:"a,string,omitempty"`
}
}{A: new(struct {
A float32 `json:"a,string,omitempty"`
})},
},
// PtrHeadFloat32NotRoot
{
@ -631,6 +804,16 @@ func TestCoverFloat32(t *testing.T) {
A float32 `json:"a,string"`
}{A: 1})},
},
{
name: "PtrHeadFloat32NotRootStringOmitEmpty",
data: struct {
A *struct {
A float32 `json:"a,string,omitempty"`
}
}{A: &(struct {
A float32 `json:"a,string,omitempty"`
}{A: 1})},
},
// PtrHeadFloat32PtrNotRoot
{
@ -663,6 +846,16 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
}{A: float32ptr(1)})},
},
{
name: "PtrHeadFloat32PtrNotRootStringOmitEmpty",
data: struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
}
}{A: &(struct {
A *float32 `json:"a,string,omitempty"`
}{A: float32ptr(1)})},
},
// PtrHeadFloat32PtrNilNotRoot
{
@ -695,6 +888,16 @@ func TestCoverFloat32(t *testing.T) {
A *float32 `json:"a,string"`
}{A: nil})},
},
{
name: "PtrHeadFloat32PtrNilNotRootStringOmitEmpty",
data: struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
}
}{A: &(struct {
A *float32 `json:"a,string,omitempty"`
}{A: nil})},
},
// PtrHeadFloat32NilNotRoot
{
@ -721,6 +924,14 @@ func TestCoverFloat32(t *testing.T) {
} `json:",string"`
}{A: nil},
},
{
name: "PtrHeadFloat32NilNotRootStringOmitEmpty",
data: struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
} `json:",string,omitempty"`
}{A: nil},
},
// HeadFloat32ZeroMultiFieldsNotRoot
{
@ -756,6 +967,17 @@ func TestCoverFloat32(t *testing.T) {
}
}{},
},
{
name: "HeadFloat32ZeroMultiFieldsNotRootStringOmitEmpty",
data: struct {
A struct {
A float32 `json:"a,string,omitempty"`
}
B struct {
B float32 `json:"b,string,omitempty"`
}
}{},
},
// HeadFloat32MultiFieldsNotRoot
{
@ -803,6 +1025,21 @@ func TestCoverFloat32(t *testing.T) {
B float32 `json:"b,string"`
}{B: 2}},
},
{
name: "HeadFloat32MultiFieldsNotRootStringOmitEmpty",
data: struct {
A struct {
A float32 `json:"a,string,omitempty"`
}
B struct {
B float32 `json:"b,string,omitempty"`
}
}{A: struct {
A float32 `json:"a,string,omitempty"`
}{A: 1}, B: struct {
B float32 `json:"b,string,omitempty"`
}{B: 2}},
},
// HeadFloat32PtrMultiFieldsNotRoot
{
@ -850,6 +1087,21 @@ func TestCoverFloat32(t *testing.T) {
B *float32 `json:"b,string"`
}{B: float32ptr(2)}},
},
{
name: "HeadFloat32PtrMultiFieldsNotRootStringOmitEmpty",
data: struct {
A struct {
A *float32 `json:"a,string,omitempty"`
}
B struct {
B *float32 `json:"b,string,omitempty"`
}
}{A: struct {
A *float32 `json:"a,string,omitempty"`
}{A: float32ptr(1)}, B: struct {
B *float32 `json:"b,string,omitempty"`
}{B: float32ptr(2)}},
},
// HeadFloat32PtrNilMultiFieldsNotRoot
{
@ -897,6 +1149,21 @@ func TestCoverFloat32(t *testing.T) {
B *float32 `json:"b,string"`
}{B: nil}},
},
{
name: "HeadFloat32PtrNilMultiFieldsNotRootStringOmitEmpty",
data: struct {
A struct {
A *float32 `json:"a,string,omitempty"`
}
B struct {
B *float32 `json:"b,string,omitempty"`
}
}{A: struct {
A *float32 `json:"a,string,omitempty"`
}{A: nil}, B: struct {
B *float32 `json:"b,string,omitempty"`
}{B: nil}},
},
// PtrHeadFloat32ZeroMultiFieldsNotRoot
{
@ -932,6 +1199,17 @@ func TestCoverFloat32(t *testing.T) {
}
}{},
},
{
name: "PtrHeadFloat32ZeroMultiFieldsNotRootStringOmitEmpty",
data: &struct {
A struct {
A float32 `json:"a,string,omitempty"`
}
B struct {
B float32 `json:"b,string,omitempty"`
}
}{},
},
// PtrHeadFloat32MultiFieldsNotRoot
{
@ -979,6 +1257,21 @@ func TestCoverFloat32(t *testing.T) {
B float32 `json:"b,string"`
}{B: 2}},
},
{
name: "PtrHeadFloat32MultiFieldsNotRootStringOmitEmpty",
data: &struct {
A struct {
A float32 `json:"a,string,omitempty"`
}
B struct {
B float32 `json:"b,string,omitempty"`
}
}{A: struct {
A float32 `json:"a,string,omitempty"`
}{A: 1}, B: struct {
B float32 `json:"b,string,omitempty"`
}{B: 2}},
},
// PtrHeadFloat32PtrMultiFieldsNotRoot
{
@ -1026,6 +1319,21 @@ func TestCoverFloat32(t *testing.T) {
B *float32 `json:"b,string"`
}{B: float32ptr(2)})},
},
{
name: "PtrHeadFloat32PtrMultiFieldsNotRootStringOmitEmpty",
data: &struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
}
B *struct {
B *float32 `json:"b,string,omitempty"`
}
}{A: &(struct {
A *float32 `json:"a,string,omitempty"`
}{A: float32ptr(1)}), B: &(struct {
B *float32 `json:"b,string,omitempty"`
}{B: float32ptr(2)})},
},
// PtrHeadFloat32PtrNilMultiFieldsNotRoot
{
@ -1061,6 +1369,17 @@ func TestCoverFloat32(t *testing.T) {
} `json:",string"`
}{A: nil, B: nil},
},
{
name: "PtrHeadFloat32PtrNilMultiFieldsNotRootStringOmitEmpty",
data: &struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
} `json:",string,omitempty"`
B *struct {
B *float32 `json:"b,string,omitempty"`
} `json:",string,omitempty"`
}{A: nil, B: nil},
},
// PtrHeadFloat32NilMultiFieldsNotRoot
{
@ -1096,6 +1415,17 @@ func TestCoverFloat32(t *testing.T) {
}
})(nil),
},
{
name: "PtrHeadFloat32NilMultiFieldsNotRootStringOmitEmpty",
data: (*struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
}
B *struct {
B *float32 `json:"b,string,omitempty"`
}
})(nil),
},
// PtrHeadFloat32DoubleMultiFieldsNotRoot
{
@ -1155,6 +1485,25 @@ func TestCoverFloat32(t *testing.T) {
B float32 `json:"b,string"`
}{A: 3, B: 4})},
},
{
name: "PtrHeadFloat32DoubleMultiFieldsNotRootStringOmitEmpty",
data: &struct {
A *struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}
B *struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}
}{A: &(struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}{A: 1, B: 2}), B: &(struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}{A: 3, B: 4})},
},
// PtrHeadFloat32NilDoubleMultiFieldsNotRoot
{
@ -1196,6 +1545,19 @@ func TestCoverFloat32(t *testing.T) {
}
}{A: nil, B: nil},
},
{
name: "PtrHeadFloat32NilDoubleMultiFieldsNotRootStringOmitEmpty",
data: &struct {
A *struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}
B *struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}
}{A: nil, B: nil},
},
// PtrHeadFloat32NilDoubleMultiFieldsNotRoot
{
@ -1237,6 +1599,19 @@ func TestCoverFloat32(t *testing.T) {
}
})(nil),
},
{
name: "PtrHeadFloat32NilDoubleMultiFieldsNotRootStringOmitEmpty",
data: (*struct {
A *struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}
B *struct {
A float32 `json:"a,string,omitempty"`
B float32 `json:"b,string,omitempty"`
}
})(nil),
},
// PtrHeadFloat32PtrDoubleMultiFieldsNotRoot
{
@ -1296,6 +1671,25 @@ func TestCoverFloat32(t *testing.T) {
B *float32 `json:"b,string"`
}{A: float32ptr(3), B: float32ptr(4)})},
},
{
name: "PtrHeadFloat32PtrDoubleMultiFieldsNotRootStringOmitEmpty",
data: &struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}
B *struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}
}{A: &(struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}{A: float32ptr(1), B: float32ptr(2)}), B: &(struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}{A: float32ptr(3), B: float32ptr(4)})},
},
// PtrHeadFloat32PtrNilDoubleMultiFieldsNotRoot
{
@ -1337,6 +1731,19 @@ func TestCoverFloat32(t *testing.T) {
}
}{A: nil, B: nil},
},
{
name: "PtrHeadFloat32PtrNilDoubleMultiFieldsNotRootStringOmitEmpty",
data: &struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}
B *struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}
}{A: nil, B: nil},
},
// PtrHeadFloat32PtrNilDoubleMultiFieldsNotRoot
{
@ -1378,6 +1785,19 @@ func TestCoverFloat32(t *testing.T) {
}
})(nil),
},
{
name: "PtrHeadFloat32PtrNilDoubleMultiFieldsNotRootStringOmitEmpty",
data: (*struct {
A *struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}
B *struct {
A *float32 `json:"a,string,omitempty"`
B *float32 `json:"b,string,omitempty"`
}
})(nil),
},
// AnonymousHeadFloat32
{
@ -1410,6 +1830,16 @@ func TestCoverFloat32(t *testing.T) {
B: 2,
},
},
{
name: "AnonymousHeadFloat32StringOmitEmpty",
data: struct {
structFloat32StringOmitEmpty
B float32 `json:"b,string,omitempty"`
}{
structFloat32StringOmitEmpty: structFloat32StringOmitEmpty{A: 1},
B: 2,
},
},
// PtrAnonymousHeadFloat32
{
@ -1442,6 +1872,16 @@ func TestCoverFloat32(t *testing.T) {
B: 2,
},
},
{
name: "PtrAnonymousHeadFloat32StringOmitEmpty",
data: struct {
*structFloat32StringOmitEmpty
B float32 `json:"b,string,omitempty"`
}{
structFloat32StringOmitEmpty: &structFloat32StringOmitEmpty{A: 1},
B: 2,
},
},
// NilPtrAnonymousHeadFloat32
{
@ -1474,6 +1914,16 @@ func TestCoverFloat32(t *testing.T) {
B: 2,
},
},
{
name: "NilPtrAnonymousHeadFloat32StringOmitEmpty",
data: struct {
*structFloat32StringOmitEmpty
B float32 `json:"b,string,omitempty"`
}{
structFloat32StringOmitEmpty: nil,
B: 2,
},
},
// AnonymousHeadFloat32Ptr
{
@ -1506,6 +1956,16 @@ func TestCoverFloat32(t *testing.T) {
B: float32ptr(2),
},
},
{
name: "AnonymousHeadFloat32PtrStringOmitEmpty",
data: struct {
structFloat32PtrStringOmitEmpty
B *float32 `json:"b,string,omitempty"`
}{
structFloat32PtrStringOmitEmpty: structFloat32PtrStringOmitEmpty{A: float32ptr(1)},
B: float32ptr(2),
},
},
// AnonymousHeadFloat32PtrNil
{
@ -1538,6 +1998,16 @@ func TestCoverFloat32(t *testing.T) {
B: float32ptr(2),
},
},
{
name: "AnonymousHeadFloat32PtrNilStringOmitEmpty",
data: struct {
structFloat32PtrStringOmitEmpty
B *float32 `json:"b,string,omitempty"`
}{
structFloat32PtrStringOmitEmpty: structFloat32PtrStringOmitEmpty{A: nil},
B: float32ptr(2),
},
},
// PtrAnonymousHeadFloat32Ptr
{
@ -1570,6 +2040,16 @@ func TestCoverFloat32(t *testing.T) {
B: float32ptr(2),
},
},
{
name: "PtrAnonymousHeadFloat32PtrStringOmitEmpty",
data: struct {
*structFloat32PtrStringOmitEmpty
B *float32 `json:"b,string,omitempty"`
}{
structFloat32PtrStringOmitEmpty: &structFloat32PtrStringOmitEmpty{A: float32ptr(1)},
B: float32ptr(2),
},
},
// NilPtrAnonymousHeadFloat32Ptr
{
@ -1602,6 +2082,16 @@ func TestCoverFloat32(t *testing.T) {
B: float32ptr(2),
},
},
{
name: "NilPtrAnonymousHeadFloat32PtrStringOmitEmpty",
data: struct {
*structFloat32PtrStringOmitEmpty
B *float32 `json:"b,string,omitempty"`
}{
structFloat32PtrStringOmitEmpty: nil,
B: float32ptr(2),
},
},
// AnonymousHeadFloat32Only
{
@ -1628,6 +2118,14 @@ func TestCoverFloat32(t *testing.T) {
structFloat32String: structFloat32String{A: 1},
},
},
{
name: "AnonymousHeadFloat32OnlyStringOmitEmpty",
data: struct {
structFloat32StringOmitEmpty
}{
structFloat32StringOmitEmpty: structFloat32StringOmitEmpty{A: 1},
},
},
// PtrAnonymousHeadFloat32Only
{
@ -1654,6 +2152,14 @@ func TestCoverFloat32(t *testing.T) {
structFloat32String: &structFloat32String{A: 1},
},
},
{
name: "PtrAnonymousHeadFloat32OnlyStringOmitEmpty",
data: struct {
*structFloat32StringOmitEmpty
}{
structFloat32StringOmitEmpty: &structFloat32StringOmitEmpty{A: 1},
},
},
// NilPtrAnonymousHeadFloat32Only
{
@ -1680,6 +2186,14 @@ func TestCoverFloat32(t *testing.T) {
structFloat32String: nil,
},
},
{
name: "NilPtrAnonymousHeadFloat32OnlyStringOmitEmpty",
data: struct {
*structFloat32StringOmitEmpty
}{
structFloat32StringOmitEmpty: nil,
},
},
// AnonymousHeadFloat32PtrOnly
{
@ -1706,6 +2220,14 @@ func TestCoverFloat32(t *testing.T) {
structFloat32PtrString: structFloat32PtrString{A: float32ptr(1)},
},
},
{
name: "AnonymousHeadFloat32PtrOnlyStringOmitEmpty",
data: struct {
structFloat32PtrStringOmitEmpty
}{
structFloat32PtrStringOmitEmpty: structFloat32PtrStringOmitEmpty{A: float32ptr(1)},
},
},
// AnonymousHeadFloat32PtrNilOnly
{
@ -1732,6 +2254,14 @@ func TestCoverFloat32(t *testing.T) {
structFloat32PtrString: structFloat32PtrString{A: nil},
},
},
{
name: "AnonymousHeadFloat32PtrNilOnlyStringOmitEmpty",
data: struct {
structFloat32PtrStringOmitEmpty
}{
structFloat32PtrStringOmitEmpty: structFloat32PtrStringOmitEmpty{A: nil},
},
},
// PtrAnonymousHeadFloat32PtrOnly
{
@ -1758,6 +2288,14 @@ func TestCoverFloat32(t *testing.T) {
structFloat32PtrString: &structFloat32PtrString{A: float32ptr(1)},
},
},
{
name: "PtrAnonymousHeadFloat32PtrOnlyStringOmitEmpty",
data: struct {
*structFloat32PtrStringOmitEmpty
}{
structFloat32PtrStringOmitEmpty: &structFloat32PtrStringOmitEmpty{A: float32ptr(1)},
},
},
// NilPtrAnonymousHeadFloat32PtrOnly
{
@ -1784,6 +2322,14 @@ func TestCoverFloat32(t *testing.T) {
structFloat32PtrString: nil,
},
},
{
name: "NilPtrAnonymousHeadFloat32PtrOnlyStringOmitEmpty",
data: struct {
*structFloat32PtrStringOmitEmpty
}{
structFloat32PtrStringOmitEmpty: nil,
},
},
}
for _, test := range tests {
for _, indent := range []bool{true, false} {