Browse Source
QAPISchemaMember gains .ifcond for enum members: inherited classes, such as QAPISchemaObjectTypeMember, will thus have an ifcond member after this (those different types will also use the .ifcond to store the condition and generate conditional code in the following patches). The generated code remains unconditional for now. Later patches generate the conditionals. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181213123724.4866-10-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>pull/78/head
committed by
Markus Armbruster
11 changed files with 27 additions and 6 deletions
@ -1,2 +1,2 @@ |
|||
tests/qapi-schema/enum-dict-member-unknown.json:2: Unknown key 'bad-key' in dictionary member of enum 'MyEnum' |
|||
Valid keys are 'name'. |
|||
Valid keys are 'if', 'name'. |
|||
|
|||
@ -0,0 +1 @@ |
|||
tests/qapi-schema/enum-if-invalid.json:2: 'if' condition must be a string or a list of strings |
|||
@ -0,0 +1 @@ |
|||
1 |
|||
@ -0,0 +1,3 @@ |
|||
# check invalid 'if' type |
|||
{ 'enum': 'TestIfEnum', 'data': |
|||
[ 'foo', { 'name' : 'bar', 'if': { 'val': 'foo' } } ] } |
|||
Loading…
Reference in new issue