xref: /openbmc/qemu/tests/qapi-schema/union-bad-discriminator.json (revision f0984d40)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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' } }
16

served by {OpenGrok

Last Index Update: Sat May 10 03:01:07 CDT 2025