mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
tests/qapi-schema: Rework comments on longhand member definitions
A few old comments talk about "desired future use of defaults" and
"anonymous inline branch types". Kind of misleading since commit
87adbbffd4
"qapi: add a dictionary form for TYPE" added longhand
member definitions. Talk about that instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-4-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
00d16f239f
commit
5bd18d98cd
@ -1,2 +1,2 @@
|
||||
event-member-invalid-dict.json: In event 'EVENT_A':
|
||||
event-member-invalid-dict.json:1: 'data' member 'a' misses key 'type'
|
||||
event-member-invalid-dict.json:3: 'data' member 'a' misses key 'type'
|
||||
|
@ -1,2 +1,4 @@
|
||||
# event 'data' member with dict value is (longhand) argument
|
||||
# definition, not inline complex type
|
||||
{ 'event': 'EVENT_A',
|
||||
'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }
|
||||
|
@ -1,5 +1,5 @@
|
||||
# we require branches to be a struct name
|
||||
# TODO: should we allow anonymous inline branch types?
|
||||
# union 'data' member with dict value is (longhand) branch
|
||||
# definition, not inline complex type
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
{ 'struct': 'Base',
|
||||
|
@ -1,2 +1,2 @@
|
||||
nested-struct-data-invalid-dict.json: In command 'foo':
|
||||
nested-struct-data-invalid-dict.json:2: 'data' member 'a' misses key 'type'
|
||||
nested-struct-data-invalid-dict.json:3: 'data' member 'a' misses key 'type'
|
||||
|
@ -1,3 +1,4 @@
|
||||
# inline subtypes collide with our desired future use of defaults
|
||||
# command 'data' member with dict value is (longhand) argument
|
||||
# definition, not inline complex type
|
||||
{ 'command': 'foo',
|
||||
'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }
|
||||
|
@ -1,3 +1,3 @@
|
||||
# inline subtypes collide with our desired future use of defaults
|
||||
# {} is not a valid type reference
|
||||
{ 'command': 'foo',
|
||||
'data': { 'a' : { 'type': {} }, 'b' : 'str' } }
|
||||
|
@ -1,2 +1,2 @@
|
||||
struct-member-invalid-dict.json: In struct 'foo':
|
||||
struct-member-invalid-dict.json:2: 'data' member '*a' misses key 'type'
|
||||
struct-member-invalid-dict.json:3: 'data' member '*a' misses key 'type'
|
||||
|
@ -1,3 +1,4 @@
|
||||
# Long form of member must have a value member 'type'
|
||||
# struct 'data' member with dict value is (longhand) member
|
||||
# definition, not inline complex type
|
||||
{ 'struct': 'foo',
|
||||
'data': { '*a': { 'case': 'foo' } } }
|
||||
|
Loading…
Reference in New Issue
Block a user