mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
tests/qapi-schema: Make test-qapi.py print arrays
The next few commits mess with array types, and having the changes exposed in output of test-qapi.py will be useful. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190301154051.23317-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Rationale added to commit message]
This commit is contained in:
parent
0984a157c1
commit
ca0ac758d6
2 changed files with 12 additions and 0 deletions
|
@ -32,6 +32,12 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
|
|||
self._print_if(m.ifcond, indent=8)
|
||||
self._print_if(ifcond)
|
||||
|
||||
def visit_array_type(self, name, info, ifcond, element_type):
|
||||
if not info:
|
||||
return # suppress built-in arrays
|
||||
print('array %s %s' % (name, element_type.name))
|
||||
self._print_if(ifcond)
|
||||
|
||||
def visit_object_type(self, name, info, ifcond, base, members, variants):
|
||||
print('object %s' % name)
|
||||
if base:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue