()
| 579 | } |
| 580 | |
| 581 | function buildOptionalHolder(): OptionalHolder { |
| 582 | const allTypes: AllOptionalTypes = { |
| 583 | boolValue: true, |
| 584 | int8Value: 12, |
| 585 | int16Value: 1234, |
| 586 | int32Value: -123456, |
| 587 | fixedI32Value: -123456, |
| 588 | varintI32Value: -12345, |
| 589 | int64Value: -123456789n, |
| 590 | fixedI64Value: -123456789n, |
| 591 | varintI64Value: -987654321n, |
| 592 | taggedI64Value: 123456789n, |
| 593 | uint8Value: 200, |
| 594 | uint16Value: 60000, |
| 595 | uint32Value: 1234567890, |
| 596 | fixedU32Value: 1234567890, |
| 597 | varintU32Value: 1234567890, |
| 598 | uint64Value: 9876543210n, |
| 599 | fixedU64Value: 9876543210n, |
| 600 | varintU64Value: 12345678901n, |
| 601 | taggedU64Value: 2222222222n, |
| 602 | float32Value: 2.5, |
| 603 | float64Value: 3.5, |
| 604 | stringValue: "optional", |
| 605 | bytesValue: new Uint8Array([1, 2, 3]), |
| 606 | dateValue: buildLocalDate(2024, 1, 2), |
| 607 | timestampValue: new Date("2024-01-02T03:04:05Z"), |
| 608 | int32List: [1, 2, 3], |
| 609 | stringList: ["alpha", "beta"], |
| 610 | int64Map: new Map([ |
| 611 | ["alpha", 10n], |
| 612 | ["beta", 20n], |
| 613 | ]), |
| 614 | }; |
| 615 | return { |
| 616 | allTypes, |
| 617 | choice: { |
| 618 | case: OptionalUnionCase.NOTE, |
| 619 | value: "optional", |
| 620 | }, |
| 621 | }; |
| 622 | } |
| 623 | |
| 624 | function buildTree(): TreeNode { |
| 625 | const childA: TreeNode = { |
no test coverage detected