Previous patches have led up to the point where I create the new meta-type "'alternate':'Foo'". See the previous patches for documentation; I intentionally split as much work into earlier patches to minimize the size of this patch, but a lot of it is churn due to testsuite fallout after updating to the new type. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
16 lines
529 B
JSON
16 lines
529 B
JSON
# we require the discriminator to be a string naming a base-type member
|
|
# this tests the old syntax for anonymous unions before we added alternates
|
|
{ 'enum': 'TestEnum',
|
|
'data': [ 'value1', 'value2' ] }
|
|
{ 'type': 'TestBase',
|
|
'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
|
|
{ 'type': 'TestTypeA',
|
|
'data': { 'string': 'str' } }
|
|
{ 'type': 'TestTypeB',
|
|
'data': { 'integer': 'int' } }
|
|
{ 'union': 'TestUnion',
|
|
'base': 'TestBase',
|
|
'discriminator': {},
|
|
'data': { 'kind1': 'TestTypeA',
|
|
'kind2': 'TestTypeB' } }
|