Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
[qemu/ar7.git] / tests / qapi-schema / flat-union-bad-discriminator.json
blobcd10b9d901823cc53e28d40864508ccaafb9606a
1 # we require the discriminator to be a string naming a base-type member
2 # this tests the old syntax for anonymous unions before we added alternates
3 { 'enum': 'TestEnum',
4   'data': [ 'value1', 'value2' ] }
5 { 'struct': 'TestBase',
6   'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
7 { 'struct': 'TestTypeA',
8   'data': { 'string': 'str' } }
9 { 'struct': 'TestTypeB',
10   'data': { 'integer': 'int' } }
11 { 'union': 'TestUnion',
12   'base': 'TestBase',
13   'discriminator': {},
14   'data': { 'kind1': 'TestTypeA',
15             'kind2': 'TestTypeB' } }