From ca0ac758d6fad30676ded90d3975f282d57a4435 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 1 Mar 2019 16:40:45 +0100 Subject: 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 Message-Id: <20190301154051.23317-2-armbru@redhat.com> Reviewed-by: Eric Blake [Rationale added to commit message] --- tests/qapi-schema/test-qapi.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/qapi-schema/test-qapi.py') diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index d592854..d21fca0 100644 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-schema/test-qapi.py @@ -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: -- cgit v1.1