Merge tag 'pull-ppc-20221117' of https://gitlab.com/danielhb/qemu into staging
[qemu/ar7.git] / tests / qapi-schema / union-base-union.json
blob82d4c96e5701e6595653c44f108bd6bddf0ab3c8
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.
5 { 'enum': 'TestEnum',
6   'data': [ 'value1', 'value2' ] }
7 { 'struct': 'TestTypeA',
8   'data': { 'string': 'str' } }
9 { 'struct': 'TestTypeB',
10   'data': { 'integer': 'int' } }
11 { 'enum': 'Enum', 'data': [ 'kind1', 'kind2' ] }
12 { 'union': 'UnionBase',
13   'base': { 'type': 'Enum' },
14   'discriminator': 'type',
15   'data': { 'kind1': 'TestTypeA',
16             'kind2': 'TestTypeB' } }
17 { 'union': 'TestUnion',
18   'base': 'UnionBase',
19   'discriminator': 'type',
20   'data': { 'kind1': 'TestTypeA',
21             'kind2': 'TestTypeB' } }