qemu-patch-raspberry4/tests/qapi-schema/args-union.json
Markus Armbruster 76432d988b tests/qapi-schema: Purge simple unions from tests
Drop tests that are specifically about simple unions:

* SugaredUnion in doc-good: flat unions are covered by @Object.

* union-branch-case and union-clash-branches: branch naming for flat
  unions is enforced for the tag enum instead, which is covered by
  enum-member-case and enum-clash-member.

* union-empty: empty flat unions are covered by flat-union-empty.

Rewrite the remainder to use flat unions: args-union, bad-base,
flat-union-base-union, union-branch-invalid-dict, union-unknown.

Except drop union-optional-branch. because converting this one is not
worth the trouble; we don't explicitly check names beginning with '*'
in other places, either.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-21-armbru@redhat.com>
2021-09-27 08:23:25 +02:00

10 lines
357 B
JSON

# use of union arguments requires 'boxed':true
{ 'enum': 'Enum', 'data': [ 'case1', 'case2' ] }
{ 'struct': 'Case1', 'data': { 'data': 'int' } }
{ 'struct': 'Case2', 'data': { 'data': 'str' } }
{ 'union': 'Uni',
'base': { 'type': 'Enum' },
'discriminator': 'type',
'data': { 'case1': 'Case1', 'case2': 'Case2' } }
{ 'command': 'oops', 'data': 'Uni' }