| 1 |
package test |
| 2 |
|
| 3 |
func init() { |
| 4 |
testCases = append(testCases, |
| 5 |
(*struct { |
| 6 |
EmbeddedFloat64 |
| 7 |
})(nil), |
| 8 |
(*struct { |
| 9 |
EmbeddedInt32 |
| 10 |
})(nil), |
| 11 |
(*struct { |
| 12 |
F1 float64 |
| 13 |
StringMarshaler |
| 14 |
F2 int32 |
| 15 |
})(nil), |
| 16 |
(*struct { |
| 17 |
EmbeddedMapStringString |
| 18 |
})(nil), |
| 19 |
(*struct { |
| 20 |
*EmbeddedFloat64 |
| 21 |
})(nil), |
| 22 |
(*struct { |
| 23 |
*EmbeddedInt32 |
| 24 |
})(nil), |
| 25 |
(*struct { |
| 26 |
*EmbeddedMapStringString |
| 27 |
})(nil), |
| 28 |
(*struct { |
| 29 |
*EmbeddedSliceString |
| 30 |
})(nil), |
| 31 |
(*struct { |
| 32 |
*EmbeddedString |
| 33 |
})(nil), |
| 34 |
(*struct { |
| 35 |
*EmbeddedStruct |
| 36 |
})(nil), |
| 37 |
(*struct { |
| 38 |
EmbeddedSliceString |
| 39 |
})(nil), |
| 40 |
(*struct { |
| 41 |
EmbeddedString |
| 42 |
})(nil), |
| 43 |
(*struct { |
| 44 |
EmbeddedString `json:"othername"` |
| 45 |
})(nil), |
| 46 |
(*struct { |
| 47 |
EmbeddedStruct |
| 48 |
})(nil), |
| 49 |
(*struct { |
| 50 |
F1 float64 |
| 51 |
StringTextMarshaler |
| 52 |
F2 int32 |
| 53 |
})(nil), |
| 54 |
(*OverlapDifferentLevels)(nil), |
| 55 |
(*IgnoreDeeperLevel)(nil), |
| 56 |
(*SameLevel1BothTagged)(nil), |
| 57 |
(*SameLevel1NoTags)(nil), |
| 58 |
(*SameLevel1Tagged)(nil), |
| 59 |
(*SameLevel2BothTagged)(nil), |
| 60 |
(*SameLevel2NoTags)(nil), |
| 61 |
(*SameLevel2Tagged)(nil), |
| 62 |
(*EmbeddedPtr)(nil), |
| 63 |
(*UnnamedLiteral)(nil), |
| 64 |
) |
| 65 |
} |
| 66 |
|
| 67 |
type EmbeddedFloat64 float64 |
| 68 |
type EmbeddedInt32 int32 |
| 69 |
type EmbeddedMapStringString map[string]string |
| 70 |
type EmbeddedSliceString []string |
| 71 |
type EmbeddedString string |
| 72 |
type EmbeddedStruct struct { |
| 73 |
String string |
| 74 |
Int int32 |
| 75 |
Float float64 |
| 76 |
Struct struct { |
| 77 |
X string |
| 78 |
} |
| 79 |
Slice []string |
| 80 |
Map map[string]string |
| 81 |
} |
| 82 |
|
| 83 |
type OverlapDifferentLevelsE1 struct { |
| 84 |
F1 int32 |
| 85 |
} |
| 86 |
|
| 87 |
type OverlapDifferentLevelsE2 struct { |
| 88 |
F2 string |
| 89 |
} |
| 90 |
|
| 91 |
type OverlapDifferentLevels struct { |
| 92 |
OverlapDifferentLevelsE1 |
| 93 |
OverlapDifferentLevelsE2 |
| 94 |
F1 string |
| 95 |
} |
| 96 |
|
| 97 |
type IgnoreDeeperLevelDoubleEmbedded struct { |
| 98 |
F1 int32 `json:"F1"` |
| 99 |
} |
| 100 |
|
| 101 |
type IgnoreDeeperLevelE1 struct { |
| 102 |
IgnoreDeeperLevelDoubleEmbedded |
| 103 |
F1 int32 |
| 104 |
} |
| 105 |
|
| 106 |
type IgnoreDeeperLevelE2 struct { |
| 107 |
F1 int32 `json:"F1"` |
| 108 |
IgnoreDeeperLevelDoubleEmbedded |
| 109 |
} |
| 110 |
|
| 111 |
type IgnoreDeeperLevel struct { |
| 112 |
IgnoreDeeperLevelE1 |
| 113 |
IgnoreDeeperLevelE2 |
| 114 |
} |
| 115 |
|
| 116 |
type SameLevel1BothTaggedE1 struct { |
| 117 |
F1 int32 `json:"F1"` |
| 118 |
} |
| 119 |
|
| 120 |
type SameLevel1BothTaggedE2 struct { |
| 121 |
F1 int32 `json:"F1"` |
| 122 |
} |
| 123 |
|
| 124 |
type SameLevel1BothTagged struct { |
| 125 |
SameLevel1BothTaggedE1 |
| 126 |
SameLevel1BothTaggedE2 |
| 127 |
} |
| 128 |
|
| 129 |
type SameLevel1NoTagsE1 struct { |
| 130 |
F1 int32 |
| 131 |
} |
| 132 |
|
| 133 |
type SameLevel1NoTagsE2 struct { |
| 134 |
F1 int32 |
| 135 |
} |
| 136 |
|
| 137 |
type SameLevel1NoTags struct { |
| 138 |
SameLevel1NoTagsE1 |
| 139 |
SameLevel1NoTagsE2 |
| 140 |
} |
| 141 |
|
| 142 |
type SameLevel1TaggedE1 struct { |
| 143 |
F1 int32 |
| 144 |
} |
| 145 |
|
| 146 |
type SameLevel1TaggedE2 struct { |
| 147 |
F1 int32 `json:"F1"` |
| 148 |
} |
| 149 |
|
| 150 |
type SameLevel1Tagged struct { |
| 151 |
SameLevel1TaggedE1 |
| 152 |
SameLevel1TaggedE2 |
| 153 |
} |
| 154 |
|
| 155 |
type SameLevel2BothTaggedDE1 struct { |
| 156 |
F1 int32 `json:"F1"` |
| 157 |
} |
| 158 |
|
| 159 |
type SameLevel2BothTaggedE1 struct { |
| 160 |
SameLevel2BothTaggedDE1 |
| 161 |
} |
| 162 |
|
| 163 |
// DoubleEmbedded2 TEST ONLY |
| 164 |
type SameLevel2BothTaggedDE2 struct { |
| 165 |
F1 int32 `json:"F1"` |
| 166 |
} |
| 167 |
|
| 168 |
// Embedded2 TEST ONLY |
| 169 |
type SameLevel2BothTaggedE2 struct { |
| 170 |
SameLevel2BothTaggedDE2 |
| 171 |
} |
| 172 |
|
| 173 |
type SameLevel2BothTagged struct { |
| 174 |
SameLevel2BothTaggedE1 |
| 175 |
SameLevel2BothTaggedE2 |
| 176 |
} |
| 177 |
|
| 178 |
type SameLevel2NoTagsDE1 struct { |
| 179 |
F1 int32 |
| 180 |
} |
| 181 |
|
| 182 |
type SameLevel2NoTagsE1 struct { |
| 183 |
SameLevel2NoTagsDE1 |
| 184 |
} |
| 185 |
|
| 186 |
type SameLevel2NoTagsDE2 struct { |
| 187 |
F1 int32 |
| 188 |
} |
| 189 |
|
| 190 |
type SameLevel2NoTagsE2 struct { |
| 191 |
SameLevel2NoTagsDE2 |
| 192 |
} |
| 193 |
|
| 194 |
type SameLevel2NoTags struct { |
| 195 |
SameLevel2NoTagsE1 |
| 196 |
SameLevel2NoTagsE2 |
| 197 |
} |
| 198 |
|
| 199 |
// DoubleEmbedded1 TEST ONLY |
| 200 |
type SameLevel2TaggedDE1 struct { |
| 201 |
F1 int32 |
| 202 |
} |
| 203 |
|
| 204 |
// Embedded1 TEST ONLY |
| 205 |
type SameLevel2TaggedE1 struct { |
| 206 |
SameLevel2TaggedDE1 |
| 207 |
} |
| 208 |
|
| 209 |
// DoubleEmbedded2 TEST ONLY |
| 210 |
type SameLevel2TaggedDE2 struct { |
| 211 |
F1 int32 `json:"F1"` |
| 212 |
} |
| 213 |
|
| 214 |
// Embedded2 TEST ONLY |
| 215 |
type SameLevel2TaggedE2 struct { |
| 216 |
SameLevel2TaggedDE2 |
| 217 |
} |
| 218 |
|
| 219 |
type SameLevel2Tagged struct { |
| 220 |
SameLevel2TaggedE1 |
| 221 |
SameLevel2TaggedE2 |
| 222 |
} |
| 223 |
|
| 224 |
type EmbeddedPtrO1 struct { |
| 225 |
O1F string |
| 226 |
} |
| 227 |
|
| 228 |
type EmbeddedPtrOption struct { |
| 229 |
O1 *EmbeddedPtrO1 |
| 230 |
} |
| 231 |
|
| 232 |
type EmbeddedPtr struct { |
| 233 |
EmbeddedPtrOption `json:","` |
| 234 |
} |
| 235 |
|
| 236 |
type UnnamedLiteral struct { |
| 237 |
_ struct{} |
| 238 |
} |