Benchmark harness support for STK-REQ-004.
(l int, d *codec1978.Decoder)
| 1387 | |
| 1388 | // Benchmark harness support for STK-REQ-004. |
| 1389 | func (x *CBPerson) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { |
| 1390 | var h codecSelfer6617 |
| 1391 | z, r := codec1978.GenHelperDecoder(d) |
| 1392 | _, _, _ = h, z, r |
| 1393 | var yyhl3 bool = l >= 0 |
| 1394 | for yyj3 := 0; ; yyj3++ { |
| 1395 | if yyhl3 { |
| 1396 | if yyj3 >= l { |
| 1397 | break |
| 1398 | } |
| 1399 | } else { |
| 1400 | if r.CheckBreak() { |
| 1401 | break |
| 1402 | } |
| 1403 | } |
| 1404 | r.ReadMapElemKey() |
| 1405 | yys3 := z.StringView(r.DecodeStringAsBytes()) |
| 1406 | r.ReadMapElemValue() |
| 1407 | switch yys3 { |
| 1408 | case "Name": |
| 1409 | if r.TryDecodeAsNil() { |
| 1410 | if true && x.Name != nil { |
| 1411 | x.Name = nil |
| 1412 | } |
| 1413 | } else { |
| 1414 | if x.Name == nil { |
| 1415 | x.Name = new(CBName) |
| 1416 | } |
| 1417 | |
| 1418 | x.Name.CodecDecodeSelf(d) |
| 1419 | } |
| 1420 | case "Github": |
| 1421 | if r.TryDecodeAsNil() { |
| 1422 | if true && x.Github != nil { |
| 1423 | x.Github = nil |
| 1424 | } |
| 1425 | } else { |
| 1426 | if x.Github == nil { |
| 1427 | x.Github = new(CBGithub) |
| 1428 | } |
| 1429 | |
| 1430 | x.Github.CodecDecodeSelf(d) |
| 1431 | } |
| 1432 | case "Gravatar": |
| 1433 | if r.TryDecodeAsNil() { |
| 1434 | if true && x.Gravatar != nil { |
| 1435 | x.Gravatar = nil |
| 1436 | } |
| 1437 | } else { |
| 1438 | if x.Gravatar == nil { |
| 1439 | x.Gravatar = new(CBGravatar) |
| 1440 | } |
| 1441 | |
| 1442 | x.Gravatar.CodecDecodeSelf(d) |
| 1443 | } |
| 1444 | default: |
| 1445 | z.DecStructFieldNotFound(-1, yys3) |
| 1446 | } // end switch yys3 |
no test coverage detected