Signed-off-by: Max Reitz <[email protected]>
---
tests/qapi-schema/test-qapi.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index b0f770b9bd..320e027d28 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -44,8 +44,12 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
if base:
print(' base %s' % base.name)
for m in members:
- print(' member %s: %s optional=%s'
- % (m.name, m.type.name, m.optional))
+ if m.default is not None:
+ default = ' default={}'.format(m.default)
+ else:
+ default = ''
+ print(' member %s: %s optional=%s%s'
+ % (m.name, m.type.name, m.optional, default))
self._print_if(m.ifcond, 8)
self._print_variants(variants)
self._print_if(ifcond)
--
2.21.0