tests/qapi-schema: Test for good feature lists in structs

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20190606153803.5278-3-armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Kevin Wolf 2019-06-06 17:37:58 +02:00 committed by Markus Armbruster
parent 6a8c0b5102
commit 8aa3a33e44
4 changed files with 94 additions and 0 deletions

View file

@ -49,6 +49,10 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
self._print_if(m.ifcond, 8)
self._print_variants(variants)
self._print_if(ifcond)
if features:
for f in features:
print(' feature %s' % f.name)
self._print_if(f.ifcond, 8)
def visit_alternate_type(self, name, info, ifcond, variants):
print('alternate %s' % name)