mirror of
https://github.com/mii443/qemu.git
synced 2025-08-31 11:29:26 +00: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:
@ -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:
|
||||
|
Reference in New Issue
Block a user