mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user