tests/qapi-schema: Demonstrate broken discriminator errors
When the union definition's base is an object, some error messages show it as an OrderedDict. Oops. Mark FIXME. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-5-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
cd346bdc46
commit
31248b985e
@ -1 +1 @@
|
||||
tests/qapi-schema/flat-union-invalid-discriminator.json:13: Discriminator 'enum_wrong' is not a member of base struct 'TestBase'
|
||||
tests/qapi-schema/flat-union-invalid-discriminator.json:11: Discriminator 'enum_wrong' is not a member of base struct 'OrderedDict([('enum1', {'type': 'TestEnum'})])'
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FIXME error message shows base as OrderedDict
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
|
||||
{ 'struct': 'TestBase',
|
||||
'data': { 'enum1': 'TestEnum' } }
|
||||
|
||||
{ 'struct': 'TestTypeA',
|
||||
'data': { 'string': 'str' } }
|
||||
|
||||
@ -11,7 +9,7 @@
|
||||
'data': { 'integer': 'int' } }
|
||||
|
||||
{ 'union': 'TestUnion',
|
||||
'base': 'TestBase',
|
||||
'base': { 'enum1': 'TestEnum' },
|
||||
'discriminator': 'enum_wrong',
|
||||
'data': { 'value1': 'TestTypeA',
|
||||
'value2': 'TestTypeB' } }
|
||||
|
@ -1 +1 @@
|
||||
tests/qapi-schema/flat-union-invalid-if-discriminator.json:13: The discriminator TestBase.enum1 for union TestUnion must not be conditional
|
||||
tests/qapi-schema/flat-union-invalid-if-discriminator.json:11: The discriminator OrderedDict([('enum1', OrderedDict([('type', 'TestEnum'), ('if', 'FOO')]))]).enum1 for union TestUnion must not be conditional
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FIXME error message shows base as OrderedDict
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
|
||||
{ 'struct': 'TestBase',
|
||||
'data': { 'enum1': { 'type': 'TestEnum', 'if': 'FOO' } } }
|
||||
|
||||
{ 'struct': 'TestTypeA',
|
||||
'data': { 'string': 'str' } }
|
||||
|
||||
@ -11,7 +9,7 @@
|
||||
'data': { 'integer': 'int' } }
|
||||
|
||||
{ 'union': 'TestUnion',
|
||||
'base': 'TestBase',
|
||||
'base': { 'enum1': { 'type': 'TestEnum', 'if': 'FOO' } },
|
||||
'discriminator': 'enum1',
|
||||
'data': { 'value1': 'TestTypeA',
|
||||
'value2': 'TestTypeB' } }
|
||||
|
Loading…
x
Reference in New Issue
Block a user