mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 19:33:39 +08:00
9e9eace89e
This test case verifies that invalid native enums are caught, and causes qapi to tear down the QObject tree under construction, exercising the previous patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
39 lines
1.3 KiB
Python
39 lines
1.3 KiB
Python
# *-*- Mode: Python -*-*
|
|
|
|
# for testing enums
|
|
{ 'enum': 'EnumOne',
|
|
'data': [ 'value1', 'value2', 'value3' ] }
|
|
{ 'type': 'NestedEnumsOne',
|
|
'data': { 'enum1': 'EnumOne', '*enum2': 'EnumOne', 'enum3': 'EnumOne', '*enum4': 'EnumOne' } }
|
|
|
|
# for testing nested structs
|
|
{ 'type': 'UserDefOne',
|
|
'data': { 'integer': 'int', 'string': 'str', '*enum1': 'EnumOne' } }
|
|
|
|
{ 'type': 'UserDefTwo',
|
|
'data': { 'string': 'str',
|
|
'dict': { 'string': 'str',
|
|
'dict': { 'userdef': 'UserDefOne', 'string': 'str' },
|
|
'*dict2': { 'userdef': 'UserDefOne', 'string': 'str' } } } }
|
|
|
|
{ 'type': 'UserDefNested',
|
|
'data': { 'string0': 'str',
|
|
'dict1': { 'string1': 'str',
|
|
'dict2': { 'userdef1': 'UserDefOne', 'string2': 'str' },
|
|
'*dict3': { 'userdef2': 'UserDefOne', 'string3': 'str' } } } }
|
|
|
|
# for testing unions
|
|
{ 'type': 'UserDefA',
|
|
'data': { 'boolean': 'bool' } }
|
|
|
|
{ 'type': 'UserDefB',
|
|
'data': { 'integer': 'int' } }
|
|
|
|
{ 'union': 'UserDefUnion',
|
|
'data': { 'a' : 'UserDefA', 'b' : 'UserDefB' } }
|
|
|
|
# testing commands
|
|
{ 'command': 'user_def_cmd', 'data': {} }
|
|
{ 'command': 'user_def_cmd1', 'data': {'ud1a': 'UserDefOne'} }
|
|
{ 'command': 'user_def_cmd2', 'data': {'ud1a': 'UserDefOne', 'ud1b': 'UserDefOne'}, 'returns': 'UserDefTwo' }
|