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>
This commit is contained in:
Markus Armbruster 2021-09-17 16:31:31 +02:00
parent bb5821dd81
commit 76432d988b
26 changed files with 30 additions and 84 deletions

View file

@ -32,21 +32,6 @@ object Object
case two: Variant2
if {'any': ['IFONE', 'IFTWO']}
feature union-feat1
object q_obj_Variant1-wrapper
member data: Variant1 optional=False
object q_obj_Variant2-wrapper
member data: Variant2 optional=False
enum SugaredUnionKind
member one
member two
if IFTWO
object SugaredUnion
member type: SugaredUnionKind optional=False
tag type
case one: q_obj_Variant1-wrapper
case two: q_obj_Variant2-wrapper
if IFTWO
feature union-feat2
alternate Alternate
tag type
case i: int
@ -149,13 +134,6 @@ doc symbol=Object
feature=union-feat1
a feature
doc symbol=SugaredUnion
body=
arg=type
feature=union-feat2
a feature
doc symbol=Alternate
body=