OSDN Git Service

tests/qapi-schema: Rework comments on longhand member definitions
authorMarkus Armbruster <armbru@redhat.com>
Tue, 23 Mar 2021 09:40:00 +0000 (10:40 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 23 Mar 2021 20:38:39 +0000 (21:38 +0100)
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>
tests/qapi-schema/event-member-invalid-dict.err
tests/qapi-schema/event-member-invalid-dict.json
tests/qapi-schema/flat-union-inline-invalid-dict.json
tests/qapi-schema/nested-struct-data-invalid-dict.err
tests/qapi-schema/nested-struct-data-invalid-dict.json
tests/qapi-schema/nested-struct-data.json
tests/qapi-schema/struct-member-invalid-dict.err
tests/qapi-schema/struct-member-invalid-dict.json

index c7a6a24..82f8989 100644 (file)
@@ -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'
index ee6f3ec..e58560a 100644 (file)
@@ -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' } }
index 62c7cda..1779712 100644 (file)
@@ -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',
index c044b2b..375e155 100644 (file)
@@ -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'
index efbe773..aa37b85 100644 (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',
   'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }
index 5b8a40c..2980d45 100644 (file)
@@ -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' } }
index 0621aec..f9b3f33 100644 (file)
@@ -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'
index 9fe0d45..bc3d62a 100644 (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',
   'data': { '*a': { 'case': 'foo' } } }