tests/qapi-schema: Cover optional conditional struct member
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-13-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
39d2cc8e71
commit
fa32eb9095
@ -220,7 +220,8 @@
|
||||
|
||||
{ 'struct': 'TestIfStruct',
|
||||
'data': { 'foo': 'int',
|
||||
'bar': { 'type': 'int', 'if': 'TEST_IF_STRUCT_MEMBER'} },
|
||||
'bar': { 'type': 'int', 'if': 'TEST_IF_STRUCT_MEMBER'},
|
||||
'*baz': { 'type': 'str', 'if': 'TEST_IF_STRUCT_MEMBER'} },
|
||||
'if': 'TEST_IF_STRUCT' }
|
||||
|
||||
{ 'enum': 'TestIfEnum',
|
||||
|
@ -247,6 +247,8 @@ object TestIfStruct
|
||||
member foo: int optional=False
|
||||
member bar: int optional=False
|
||||
if TEST_IF_STRUCT_MEMBER
|
||||
member baz: str optional=True
|
||||
if TEST_IF_STRUCT_MEMBER
|
||||
if TEST_IF_STRUCT
|
||||
enum TestIfEnum
|
||||
member foo
|
||||
|
Loading…
Reference in New Issue
Block a user