redefined-type.json redefined-command.json redefined-builtin.json \
redefined-event.json command-int.json bad-data.json event-max.json \
type-bypass.json type-bypass-no-gen.json type-bypass-bad-gen.json \
- data-array-empty.json data-array-unknown.json data-int.json \
- data-unknown.json data-member-unknown.json data-member-array.json \
- data-member-array-bad.json returns-array-bad.json returns-int.json \
+ args-array-empty.json args-array-unknown.json args-int.json \
+ args-unknown.json args-member-unknown.json args-member-array.json \
+ args-member-array-bad.json returns-array-bad.json returns-int.json \
returns-unknown.json returns-alternate.json returns-whitelist.json \
missing-colon.json missing-comma-list.json missing-comma-object.json \
nested-struct-data.json nested-struct-returns.json non-objects.json \
--- /dev/null
+tests/qapi-schema/args-array-empty.json:2: Member 'empty' of 'data' for command 'oops': array type must contain single type name
--- /dev/null
+# we reject an array for data if it does not contain a known type
+{ 'command': 'oops', 'data': { 'empty': [ ] } }
--- /dev/null
+tests/qapi-schema/args-array-unknown.json:2: Member 'array' of 'data' for command 'oops' uses unknown type 'array of NoSuchType'
--- /dev/null
+# we reject an array for data if it does not contain a known type
+{ 'command': 'oops', 'data': { 'array': [ 'NoSuchType' ] } }
--- /dev/null
+tests/qapi-schema/args-int.json:2: 'data' for command 'oops' cannot use built-in type 'int'
--- /dev/null
+# we reject commands where data is not an array or complex type
+{ 'command': 'oops', 'data': 'int' }
--- /dev/null
+tests/qapi-schema/args-member-array-bad.json:2: Member 'member' of 'data' for command 'oops': array type must contain single type name
--- /dev/null
+# we reject data if it does not contain a valid array type
+{ 'command': 'oops', 'data': { 'member': [ { 'nested': 'str' } ] } }
--- /dev/null
+# valid array members
+{ 'enum': 'abc', 'data': [ 'a', 'b', 'c' ] }
+{ 'struct': 'def', 'data': { 'array': [ 'abc' ] } }
+{ 'command': 'okay', 'data': { 'member1': [ 'int' ], 'member2': [ 'def' ] } }
--- /dev/null
+[OrderedDict([('enum', 'abc'), ('data', ['a', 'b', 'c'])]),
+ OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))]),
+ OrderedDict([('command', 'okay'), ('data', OrderedDict([('member1', ['int']), ('member2', ['def'])]))])]
+[{'enum_name': 'abc', 'enum_values': ['a', 'b', 'c']}]
+[OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))])]
--- /dev/null
+tests/qapi-schema/args-member-unknown.json:2: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
--- /dev/null
+# we reject data if it does not contain a known type
+{ 'command': 'oops', 'data': { 'member': 'NoSuchType' } }
--- /dev/null
+tests/qapi-schema/args-unknown.json:2: 'data' for command 'oops' uses unknown type 'NoSuchType'
--- /dev/null
+# we reject data if it does not contain a known type
+{ 'command': 'oops', 'data': 'NoSuchType' }
+++ /dev/null
-tests/qapi-schema/data-array-empty.json:2: Member 'empty' of 'data' for command 'oops': array type must contain single type name
+++ /dev/null
-# we reject an array for data if it does not contain a known type
-{ 'command': 'oops', 'data': { 'empty': [ ] } }
+++ /dev/null
-tests/qapi-schema/data-array-unknown.json:2: Member 'array' of 'data' for command 'oops' uses unknown type 'array of NoSuchType'
+++ /dev/null
-# we reject an array for data if it does not contain a known type
-{ 'command': 'oops', 'data': { 'array': [ 'NoSuchType' ] } }
+++ /dev/null
-tests/qapi-schema/data-int.json:2: 'data' for command 'oops' cannot use built-in type 'int'
+++ /dev/null
-# we reject commands where data is not an array or complex type
-{ 'command': 'oops', 'data': 'int' }
+++ /dev/null
-tests/qapi-schema/data-member-array-bad.json:2: Member 'member' of 'data' for command 'oops': array type must contain single type name
+++ /dev/null
-# we reject data if it does not contain a valid array type
-{ 'command': 'oops', 'data': { 'member': [ { 'nested': 'str' } ] } }
+++ /dev/null
-# valid array members
-{ 'enum': 'abc', 'data': [ 'a', 'b', 'c' ] }
-{ 'struct': 'def', 'data': { 'array': [ 'abc' ] } }
-{ 'command': 'okay', 'data': { 'member1': [ 'int' ], 'member2': [ 'def' ] } }
+++ /dev/null
-[OrderedDict([('enum', 'abc'), ('data', ['a', 'b', 'c'])]),
- OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))]),
- OrderedDict([('command', 'okay'), ('data', OrderedDict([('member1', ['int']), ('member2', ['def'])]))])]
-[{'enum_name': 'abc', 'enum_values': ['a', 'b', 'c']}]
-[OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))])]
+++ /dev/null
-tests/qapi-schema/data-member-unknown.json:2: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
+++ /dev/null
-# we reject data if it does not contain a known type
-{ 'command': 'oops', 'data': { 'member': 'NoSuchType' } }
+++ /dev/null
-tests/qapi-schema/data-unknown.json:2: 'data' for command 'oops' uses unknown type 'NoSuchType'
+++ /dev/null
-# we reject data if it does not contain a known type
-{ 'command': 'oops', 'data': 'NoSuchType' }