Now that we know every expression is valid with regards to its keys, we can add further tests that those keys refer to valid types. With this patch, all uses of a type (the 'data': of command, type, union, alternate, and event; the 'returns': of command; the 'base': of type and union) must resolve to an appropriate subset of metatypes declared by the current qapi parse; this includes recursing into each member of a data dictionary. Dealing with '**' and nested anonymous structs will be done in later patches. Update the testsuite to match improved output. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
13 lines
358 B
JSON
13 lines
358 B
JSON
# we require flat union branches to be a complex type
|
|
{ 'enum': 'TestEnum',
|
|
'data': [ 'value1', 'value2' ] }
|
|
{ 'type': 'Base',
|
|
'data': { 'enum1': 'TestEnum' } }
|
|
{ 'type': 'TestTypeB',
|
|
'data': { 'integer': 'int' } }
|
|
{ 'union': 'TestUnion',
|
|
'base': 'Base',
|
|
'discriminator': 'enum1',
|
|
'data': { 'value1': 'int',
|
|
'value2': 'TestTypeB' } }
|