|
121 | 121 | [simple string 8 abstractStringField] |
122 | 122 | ] |
123 | 123 | ] |
124 | | - //[abstract bit oneMoreBit] // TODO: apparently this breaks java |
| 124 | + [abstract bit oneMoreBit] // TODO: apparently this breaks java |
125 | 125 | ] |
126 | 126 |
|
127 | 127 | [type ArrayTypeTest |
|
213 | 213 | ] |
214 | 214 | ] |
215 | 215 |
|
| 216 | +// Check field with arguments |
| 217 | +[type Struct(bit signed, bit unsigned) |
| 218 | + [typeSwitch signed |
| 219 | + ['true' SignedType |
| 220 | + [simple int 8 data] |
| 221 | + ] |
| 222 | + ['false' UnsignedType |
| 223 | + [simple uint 8 data] |
| 224 | + ] |
| 225 | + ] |
| 226 | +] |
| 227 | + |
| 228 | +[type StructContainer |
| 229 | + [simple bit signed] |
| 230 | + [simple Struct('signed', '!signed') struct] |
| 231 | +] |
| 232 | + |
216 | 233 | // TODO: So far only trouble in GO, C seems OK. |
217 | 234 | [type VirtualFieldTest |
218 | 235 | [simple uint 8 simpleField] |
|
476 | 493 | // TypeSwitch in TypeSwitch |
477 | 494 | //////////////////////////////////////////////////////////////// |
478 | 495 |
|
479 | | -/* Needs to be ported to C and GO |
480 | 496 | [discriminatedType TTGranddad |
481 | 497 | [discriminator uint 8 dadNumber] |
482 | 498 | [simple uint 8 warStories] |
|
499 | 515 | ] |
500 | 516 | ] |
501 | 517 |
|
| 518 | +/* Needs to be ported to C and GO |
502 | 519 | [discriminatedType TypeSwitchInTypeSwitchParentType |
503 | 520 | [discriminator uint 8 typeNumber] |
504 | 521 | [simple uint 8 parentFieldHurz] |
|
560 | 577 | ] |
561 | 578 | ]*/ |
562 | 579 |
|
| 580 | +[discriminatedType TypeSwitchWithArg(bit arg1, uint 8 arg2) |
| 581 | + [abstract bit isItTrue] |
| 582 | + [simple uint 8 value] |
| 583 | + [typeSwitch arg1 |
| 584 | + ['true' TrustfulTypeSwitch(uint 8 value) |
| 585 | + [virtual bit isItTrue 'true'] |
| 586 | + ] |
| 587 | + ['false' UnTrustfulTypeSwitch(uint 8 value) |
| 588 | + [virtual bit isItTrue 'false'] |
| 589 | + ] |
| 590 | + ] |
| 591 | +] |
| 592 | +
|
563 | 593 | //////////////////////////////////////////////////////////////// |
564 | 594 | // Missing Tests |
565 | 595 | //////////////////////////////////////////////////////////////// |
|
0 commit comments