]>
Commit | Line | Data |
---|---|---|
d220fbcd EB |
1 | # For now, we require the base to be a struct without variants |
2 | # TODO: It would be possible to allow a union as a base, as long as all | |
3 | # permutations of QMP names exposed by base do not clash with any QMP | |
4 | # member names added by local variants. | |
3313b612 MAL |
5 | |
6 | ## | |
7 | # @TestEnum: | |
8 | ## | |
3d0c4829 EB |
9 | { 'enum': 'TestEnum', |
10 | 'data': [ 'value1', 'value2' ] } | |
3313b612 MAL |
11 | ## |
12 | # @TestTypeA: | |
13 | ## | |
895a2a80 | 14 | { 'struct': 'TestTypeA', |
3d0c4829 | 15 | 'data': { 'string': 'str' } } |
3313b612 MAL |
16 | ## |
17 | # @TestTypeB: | |
18 | ## | |
895a2a80 | 19 | { 'struct': 'TestTypeB', |
3d0c4829 | 20 | 'data': { 'integer': 'int' } } |
3313b612 MAL |
21 | ## |
22 | # @UnionBase: | |
23 | ## | |
3d0c4829 EB |
24 | { 'union': 'UnionBase', |
25 | 'data': { 'kind1': 'TestTypeA', | |
26 | 'kind2': 'TestTypeB' } } | |
3313b612 MAL |
27 | ## |
28 | # @TestUnion: | |
29 | ## | |
3d0c4829 EB |
30 | { 'union': 'TestUnion', |
31 | 'base': 'UnionBase', | |
32 | 'discriminator': 'type', | |
33 | 'data': { 'kind1': 'TestTypeA', | |
34 | 'kind2': 'TestTypeB' } } |