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:
Markus Armbruster 2021-03-23 10:40:00 +01:00
parent 00d16f239f
commit 5bd18d98cd
8 changed files with 12 additions and 8 deletions

View File

@ -1,2 +1,2 @@
event-member-invalid-dict.json: In event 'EVENT_A': 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'

View File

@ -1,2 +1,4 @@
# event 'data' member with dict value is (longhand) argument
# definition, not inline complex type
{ 'event': 'EVENT_A', { 'event': 'EVENT_A',
'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } } 'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }

View File

@ -1,5 +1,5 @@
# we require branches to be a struct name # union 'data' member with dict value is (longhand) branch
# TODO: should we allow anonymous inline branch types? # definition, not inline complex type
{ 'enum': 'TestEnum', { 'enum': 'TestEnum',
'data': [ 'value1', 'value2' ] } 'data': [ 'value1', 'value2' ] }
{ 'struct': 'Base', { 'struct': 'Base',

View File

@ -1,2 +1,2 @@
nested-struct-data-invalid-dict.json: In command 'foo': 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'

View File

@ -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', { 'command': 'foo',
'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } } 'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }

View File

@ -1,3 +1,3 @@
# inline subtypes collide with our desired future use of defaults # {} is not a valid type reference
{ 'command': 'foo', { 'command': 'foo',
'data': { 'a' : { 'type': {} }, 'b' : 'str' } } 'data': { 'a' : { 'type': {} }, 'b' : 'str' } }

View File

@ -1,2 +1,2 @@
struct-member-invalid-dict.json: In struct 'foo': 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'

View File

@ -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', { 'struct': 'foo',
'data': { '*a': { 'case': 'foo' } } } 'data': { '*a': { 'case': 'foo' } } }