diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-09-16 13:06:08 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-09-21 09:32:50 +0200 |
commit | 156402e5042193c45e70c378a93ccafd3832d8ff (patch) | |
tree | 25f6152f5ba3ca14b8af75de91f65cb47c0904a2 /tests/qapi-schema/alternate-good.out | |
parent | 3f7dc21bee1e930d5cccf607b8f83831c3bbdb09 (diff) |
tests/qapi-schema: Convert test harness to QAPISchemaVisitor
The old code prints the result of parsing (list of expression
dictionaries), and partial results of semantic analysis (list of enum
dictionaries, list of struct dictionaries).
The new code prints a trace of a schema visit, i.e. what the back-ends
are going to use. Built-in and array types are omitted, because
they're boring.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qapi-schema/alternate-good.out')
-rw-r--r-- | tests/qapi-schema/alternate-good.out | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/qapi-schema/alternate-good.out b/tests/qapi-schema/alternate-good.out index 99848eefbb..3d765ffd7b 100644 --- a/tests/qapi-schema/alternate-good.out +++ b/tests/qapi-schema/alternate-good.out @@ -1,6 +1,9 @@ -[OrderedDict([('struct', 'Data'), ('data', OrderedDict([('*number', 'int'), ('*name', 'str')]))]), - OrderedDict([('enum', 'Enum'), ('data', ['hello', 'world'])]), - OrderedDict([('alternate', 'Alt'), ('data', OrderedDict([('value', 'int'), ('string', 'Enum'), ('struct', 'Data')]))])] -[{'enum_name': 'Enum', 'enum_values': ['hello', 'world']}, - {'enum_name': 'AltKind', 'enum_values': None}] -[OrderedDict([('struct', 'Data'), ('data', OrderedDict([('*number', 'int'), ('*name', 'str')]))])] +alternate Alt + case value: int + case string: Enum + case struct: Data +enum AltKind ['value', 'string', 'struct'] +object Data + member number: int optional=True + member name: str optional=True +enum Enum ['hello', 'world'] |