summaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-inline.json
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-09-29 16:21:07 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-10-12 18:46:49 +0200
commit376863ef4895ae709aadb6f26365a5973310ef09 (patch)
treec12bb1e568857c788a7dc6bfad1e3dc32c7c61e9 /tests/qapi-schema/flat-union-inline.json
parent9c51b4412959c5331a8a931d848c4b755b5bb36a (diff)
downloadqemu-376863ef4895ae709aadb6f26365a5973310ef09.tar.gz
qapi: Reuse code for flat union base validation
Rather than open-code the check for a valid base type, we should reuse the common functionality. This allows for consistent error messages, and also makes it easier for a later patch to turn on support for inline anonymous base structures. Test flat-union-inline is updated to test only one feature (anonymous branch dictionaries), which can be implemented independently (test flat-union-bad-base already covers the idea of an anonymous base dictionary). Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1443565276-4535-10-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/flat-union-inline.json')
-rw-r--r--tests/qapi-schema/flat-union-inline.json4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qapi-schema/flat-union-inline.json b/tests/qapi-schema/flat-union-inline.json
index 6bfdd65811..62c7cda617 100644
--- a/tests/qapi-schema/flat-union-inline.json
+++ b/tests/qapi-schema/flat-union-inline.json
@@ -1,11 +1,11 @@
# we require branches to be a struct name
-# TODO: should we allow anonymous inline types?
+# TODO: should we allow anonymous inline branch types?
{ 'enum': 'TestEnum',
'data': [ 'value1', 'value2' ] }
{ 'struct': 'Base',
'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
{ 'union': 'TestUnion',
- 'base': { 'enum1': 'TestEnum', 'kind': 'str' },
+ 'base': 'Base',
'discriminator': 'enum1',
'data': { 'value1': { 'string': 'str' },
'value2': { 'integer': 'int' } } }