qapi: Back out doc comments added just to please qapi.py
This reverts commit 3313b61's changes to tests/qapi-schema/, except for tests/qapi-schema/doc-*. We could keep some of these doc comments to serve as positive test cases. However, they don't actually add to what we get from doc comment use in actual schemas, as we we don't test output matches expectations, and don't systematically cover doc comment features. Proper positive test coverage would be nice. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1489582656-31133-4-git-send-email-armbru@redhat.com>
This commit is contained in:
parent
bc52d03ff5
commit
87c16dceca
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-any.json:6: Alternate 'Alt' member 'one' cannot use type 'any'
|
||||
tests/qapi-schema/alternate-any.json:2: Alternate 'Alt' member 'one' cannot use type 'any'
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
# we do not allow the 'any' type as an alternate branch
|
||||
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt',
|
||||
'data': { 'one': 'any',
|
||||
'two': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-array.json:12: Member 'two' of alternate 'Alt' cannot be an array
|
||||
tests/qapi-schema/alternate-array.json:5: Member 'two' of alternate 'Alt' cannot be an array
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
# we do not allow array branches in alternates
|
||||
|
||||
##
|
||||
# @One:
|
||||
##
|
||||
# TODO: should we support this?
|
||||
{ 'struct': 'One',
|
||||
'data': { 'name': 'str' } }
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt',
|
||||
'data': { 'one': 'One',
|
||||
'two': [ 'int' ] } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-base.json:11: Unknown key 'base' in alternate 'Alt'
|
||||
tests/qapi-schema/alternate-base.json:4: Unknown key 'base' in alternate 'Alt'
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
# we reject alternate with base type
|
||||
|
||||
##
|
||||
# @Base:
|
||||
##
|
||||
{ 'struct': 'Base',
|
||||
'data': { 'string': 'str' } }
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt',
|
||||
'base': 'Base',
|
||||
'data': { 'number': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-clash.json:11: 'a_b' (branch of Alt1) collides with 'a-b' (branch of Alt1)
|
||||
tests/qapi-schema/alternate-clash.json:7: 'a_b' (branch of Alt1) collides with 'a-b' (branch of Alt1)
|
||||
|
|
|
@ -4,9 +4,5 @@
|
|||
# TODO: In the future, if alternates are simplified to not generate
|
||||
# the implicit Alt1Kind enum, we would still have a collision with the
|
||||
# resulting C union trying to have two members named 'a_b'.
|
||||
|
||||
##
|
||||
# @Alt1:
|
||||
##
|
||||
{ 'alternate': 'Alt1',
|
||||
'data': { 'a-b': 'str', 'a_b': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-conflict-dict.json:16: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
|
||||
tests/qapi-schema/alternate-conflict-dict.json:6: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
# we reject alternates with multiple object branches
|
||||
|
||||
##
|
||||
# @One:
|
||||
##
|
||||
{ 'struct': 'One',
|
||||
'data': { 'name': 'str' } }
|
||||
##
|
||||
# @Two:
|
||||
##
|
||||
{ 'struct': 'Two',
|
||||
'data': { 'value': 'int' } }
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt',
|
||||
'data': { 'one': 'One',
|
||||
'two': 'Two' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-conflict-string.json:11: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
|
||||
tests/qapi-schema/alternate-conflict-string.json:4: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
# we reject alternates with multiple string-like branches
|
||||
|
||||
##
|
||||
# @Enum:
|
||||
##
|
||||
{ 'enum': 'Enum',
|
||||
'data': [ 'hello', 'world' ] }
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt',
|
||||
'data': { 'one': 'str',
|
||||
'two': 'Enum' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-empty.json:6: Alternate 'Alt' should have at least two branches in 'data'
|
||||
tests/qapi-schema/alternate-empty.json:2: Alternate 'Alt' should have at least two branches in 'data'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# alternates must list at least two types to be useful
|
||||
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt', 'data': { 'i': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-nested.json:11: Member 'nested' of alternate 'Alt2' cannot use alternate type 'Alt1'
|
||||
tests/qapi-schema/alternate-nested.json:4: Member 'nested' of alternate 'Alt2' cannot use alternate type 'Alt1'
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
# we reject a nested alternate branch
|
||||
|
||||
##
|
||||
# @Alt1:
|
||||
##
|
||||
{ 'alternate': 'Alt1',
|
||||
'data': { 'name': 'str', 'value': 'int' } }
|
||||
##
|
||||
# @Alt2:
|
||||
##
|
||||
{ 'alternate': 'Alt2',
|
||||
'data': { 'nested': 'Alt1', 'b': 'bool' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/alternate-unknown.json:6: Member 'unknown' of alternate 'Alt' uses unknown type 'MissingType'
|
||||
tests/qapi-schema/alternate-unknown.json:2: Member 'unknown' of alternate 'Alt' uses unknown type 'MissingType'
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
# we reject an alternate with unknown type in branch
|
||||
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt',
|
||||
'data': { 'unknown': 'MissingType', 'i': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-alternate.json:11: 'data' for command 'oops' cannot use alternate type 'Alt'
|
||||
tests/qapi-schema/args-alternate.json:3: 'data' for command 'oops' cannot use alternate type 'Alt'
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
# we do not allow alternate arguments
|
||||
|
||||
##
|
||||
# @Alt:
|
||||
##
|
||||
{ 'alternate': 'Alt', 'data': { 'case1': 'int', 'case2': 'str' } }
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': 'Alt' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-any.json:6: 'data' for command 'oops' cannot use built-in type 'any'
|
||||
tests/qapi-schema/args-any.json:2: 'data' for command 'oops' cannot use built-in type 'any'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we do not allow an 'any' argument
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': 'any' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-array-empty.json:6: Member 'empty' of 'data' for command 'oops': array type must contain single type name
|
||||
tests/qapi-schema/args-array-empty.json:2: Member 'empty' of 'data' for command 'oops': array type must contain single type name
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject an array for data if it does not contain a known type
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': { 'empty': [ ] } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-array-unknown.json:6: Member 'array' of 'data' for command 'oops' uses unknown type 'NoSuchType'
|
||||
tests/qapi-schema/args-array-unknown.json:2: Member 'array' of 'data' for command 'oops' uses unknown type 'NoSuchType'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject an array for data if it does not contain a known type
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': { 'array': [ 'NoSuchType' ] } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-bad-boxed.json:6: 'boxed' of command 'foo' should only use true value
|
||||
tests/qapi-schema/args-bad-boxed.json:2: 'boxed' of command 'foo' should only use true value
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# 'boxed' should only appear with value true
|
||||
|
||||
##
|
||||
# @foo:
|
||||
##
|
||||
{ 'command': 'foo', 'boxed': false }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-boxed-anon.json:6: 'data' for command 'foo' should be a type name
|
||||
tests/qapi-schema/args-boxed-anon.json:2: 'data' for command 'foo' should be a type name
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# 'boxed' can only be used with named types
|
||||
|
||||
##
|
||||
# @foo:
|
||||
##
|
||||
{ 'command': 'foo', 'boxed': true, 'data': { 'string': 'str' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-boxed-empty.json:11: Cannot use 'boxed' with empty type
|
||||
tests/qapi-schema/args-boxed-empty.json:3: Cannot use 'boxed' with empty type
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
# 'boxed' requires a non-empty type
|
||||
|
||||
##
|
||||
# @Empty:
|
||||
##
|
||||
{ 'struct': 'Empty', 'data': {} }
|
||||
|
||||
##
|
||||
# @foo:
|
||||
##
|
||||
{ 'command': 'foo', 'boxed': true, 'data': 'Empty' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-boxed-string.json:6: 'data' for command 'foo' cannot use built-in type 'str'
|
||||
tests/qapi-schema/args-boxed-string.json:2: 'data' for command 'foo' cannot use built-in type 'str'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# 'boxed' requires a complex (not built-in) type
|
||||
|
||||
##
|
||||
# @foo:
|
||||
##
|
||||
{ 'command': 'foo', 'boxed': true, 'data': 'str' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-int.json:6: 'data' for command 'oops' cannot use built-in type 'int'
|
||||
tests/qapi-schema/args-int.json:2: 'data' for command 'oops' cannot use built-in type 'int'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject commands where data is not an array or complex type
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': 'int' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-invalid.json:4: 'data' for command 'foo' should be a dictionary or type name
|
||||
tests/qapi-schema/args-invalid.json:1: 'data' for command 'foo' should be a dictionary or type name
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
##
|
||||
# @foo:
|
||||
##
|
||||
{ 'command': 'foo',
|
||||
'data': false }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-member-array-bad.json:6: Member 'member' of 'data' for command 'oops': array type must contain single type name
|
||||
tests/qapi-schema/args-member-array-bad.json:2: Member 'member' of 'data' for command 'oops': array type must contain single type name
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject data if it does not contain a valid array type
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': { 'member': [ { 'nested': 'str' } ] } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-member-case.json:6: 'Arg' (parameter of no-way-this-will-get-whitelisted) should not use uppercase
|
||||
tests/qapi-schema/args-member-case.json:2: 'Arg' (parameter of no-way-this-will-get-whitelisted) should not use uppercase
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# Member names should be 'lower-case' unless the struct/command is whitelisted
|
||||
|
||||
##
|
||||
# @no-way-this-will-get-whitelisted:
|
||||
##
|
||||
{ 'command': 'no-way-this-will-get-whitelisted', 'data': { 'Arg': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-member-unknown.json:6: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
|
||||
tests/qapi-schema/args-member-unknown.json:2: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject data if it does not contain a known type
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': { 'member': 'NoSuchType' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-name-clash.json:8: 'a_b' (parameter of oops) collides with 'a-b' (parameter of oops)
|
||||
tests/qapi-schema/args-name-clash.json:4: 'a_b' (parameter of oops) collides with 'a-b' (parameter of oops)
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
# C member name collision
|
||||
# Reject members that clash when mapped to C names (we would have two 'a_b'
|
||||
# members).
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': { 'a-b': 'str', 'a_b': 'str' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-union.json:10: 'data' for command 'oops' cannot use union type 'Uni'
|
||||
tests/qapi-schema/args-union.json:3: 'data' for command 'oops' cannot use union type 'Uni'
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
# use of union arguments requires 'boxed':true
|
||||
|
||||
##
|
||||
# @Uni:
|
||||
##
|
||||
{ 'union': 'Uni', 'data': { 'case1': 'int', 'case2': 'str' } }
|
||||
##
|
||||
# oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': 'Uni' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/args-unknown.json:6: 'data' for command 'oops' uses unknown type 'NoSuchType'
|
||||
tests/qapi-schema/args-unknown.json:2: 'data' for command 'oops' uses unknown type 'NoSuchType'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject data if it does not contain a known type
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': 'NoSuchType' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/bad-base.json:10: 'base' for struct 'MyType' cannot use union type 'Union'
|
||||
tests/qapi-schema/bad-base.json:3: 'base' for struct 'MyType' cannot use union type 'Union'
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
# we reject a base that is not a struct
|
||||
|
||||
##
|
||||
# @Union:
|
||||
##
|
||||
{ 'union': 'Union', 'data': { 'a': 'int', 'b': 'str' } }
|
||||
##
|
||||
# @MyType:
|
||||
##
|
||||
{ 'struct': 'MyType', 'base': 'Union', 'data': { 'c': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/bad-data.json:6: 'data' for command 'oops' cannot be an array
|
||||
tests/qapi-schema/bad-data.json:2: 'data' for command 'oops' cannot be an array
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we ensure 'data' is a dictionary for all but enums
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'command': 'oops', 'data': [ ] }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/bad-ident.json:6: 'struct' does not allow optional name '*oops'
|
||||
tests/qapi-schema/bad-ident.json:2: 'struct' does not allow optional name '*oops'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject creating a type name with bad name
|
||||
|
||||
##
|
||||
# @*oops:
|
||||
##
|
||||
{ 'struct': '*oops', 'data': { 'i': 'int' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/bad-type-bool.json:6: 'struct' key must have a string value
|
||||
tests/qapi-schema/bad-type-bool.json:2: 'struct' key must have a string value
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject an expression with a metatype that is not a string
|
||||
|
||||
##
|
||||
# @true:
|
||||
##
|
||||
{ 'struct': true, 'data': { } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/bad-type-dict.json:6: 'command' key must have a string value
|
||||
tests/qapi-schema/bad-type-dict.json:2: 'command' key must have a string value
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject an expression with a metatype that is not a string
|
||||
|
||||
##
|
||||
# @foo:
|
||||
##
|
||||
{ 'command': { } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/base-cycle-direct.json:6: Object Loopy contains itself
|
||||
tests/qapi-schema/base-cycle-direct.json:2: Object Loopy contains itself
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject a loop in base classes
|
||||
|
||||
##
|
||||
# @Loopy:
|
||||
##
|
||||
{ 'struct': 'Loopy', 'base': 'Loopy', 'data': {} }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/base-cycle-indirect.json:6: Object Base1 contains itself
|
||||
tests/qapi-schema/base-cycle-indirect.json:2: Object Base1 contains itself
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
# we reject a loop in base classes
|
||||
|
||||
##
|
||||
# @Base1:
|
||||
##
|
||||
{ 'struct': 'Base1', 'base': 'Base2', 'data': {} }
|
||||
##
|
||||
# @Base2:
|
||||
##
|
||||
{ 'struct': 'Base2', 'base': 'Base1', 'data': {} }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/command-int.json:6: built-in 'int' is already defined
|
||||
tests/qapi-schema/command-int.json:2: built-in 'int' is already defined
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject collisions between commands and types
|
||||
|
||||
##
|
||||
# @int:
|
||||
##
|
||||
{ 'command': 'int', 'data': { 'character': 'str' } }
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
# Unindented comment
|
||||
|
||||
##
|
||||
# @Status:
|
||||
##
|
||||
{ 'enum': 'Status', # Comment to the right of code
|
||||
# Indented comment
|
||||
'data': [ 'good', 'bad', 'ugly' ] }
|
||||
|
|
|
@ -2,4 +2,3 @@ enum QType ['none', 'qnull', 'qint', 'qstring', 'qdict', 'qlist', 'qfloat', 'qbo
|
|||
prefix QTYPE
|
||||
enum Status ['good', 'bad', 'ugly']
|
||||
object q_empty
|
||||
doc symbol=Status expr=('enum', 'Status')
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/double-type.json:6: Unknown key 'command' in struct 'bar'
|
||||
tests/qapi-schema/double-type.json:2: Unknown key 'command' in struct 'bar'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject an expression with ambiguous metatype
|
||||
|
||||
##
|
||||
# @foo:
|
||||
##
|
||||
{ 'command': 'foo', 'struct': 'bar', 'data': { } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/enum-bad-name.json:6: Member of enum 'MyEnum' uses invalid name 'not^possible'
|
||||
tests/qapi-schema/enum-bad-name.json:2: Member of enum 'MyEnum' uses invalid name 'not^possible'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we ensure all enum names can map to C
|
||||
|
||||
##
|
||||
# @MyEnum:
|
||||
##
|
||||
{ 'enum': 'MyEnum', 'data': [ 'not^possible' ] }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/enum-bad-prefix.json:6: Enum 'MyEnum' requires a string for 'prefix'
|
||||
tests/qapi-schema/enum-bad-prefix.json:2: Enum 'MyEnum' requires a string for 'prefix'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# The prefix must be a string type
|
||||
|
||||
##
|
||||
# @MyEnum:
|
||||
##
|
||||
{ 'enum': 'MyEnum', 'data': [ 'one' ], 'prefix': [ 'fish' ] }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/enum-clash-member.json:6: 'one_two' (member of MyEnum) collides with 'one-two' (member of MyEnum)
|
||||
tests/qapi-schema/enum-clash-member.json:2: 'one_two' (member of MyEnum) collides with 'one-two' (member of MyEnum)
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject enums where members will clash when mapped to C enum
|
||||
|
||||
##
|
||||
# @MyEnum:
|
||||
##
|
||||
{ 'enum': 'MyEnum', 'data': [ 'one-two', 'one_two' ] }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/enum-dict-member.json:6: Member of enum 'MyEnum' requires a string name
|
||||
tests/qapi-schema/enum-dict-member.json:2: Member of enum 'MyEnum' requires a string name
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we reject any enum member that is not a string
|
||||
|
||||
##
|
||||
# @MyEnum:
|
||||
##
|
||||
{ 'enum': 'MyEnum', 'data': [ { 'value': 'str' } ] }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/enum-member-case.json:10: 'Value' (member of NoWayThisWillGetWhitelisted) should not use uppercase
|
||||
tests/qapi-schema/enum-member-case.json:3: 'Value' (member of NoWayThisWillGetWhitelisted) should not use uppercase
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
# Member names should be 'lower-case' unless the enum is whitelisted
|
||||
|
||||
##
|
||||
# @UuidInfo:
|
||||
##
|
||||
{ 'enum': 'UuidInfo', 'data': [ 'Value' ] } # UuidInfo is whitelisted
|
||||
##
|
||||
# @NoWayThisWillGetWhitelisted:
|
||||
##
|
||||
{ 'enum': 'NoWayThisWillGetWhitelisted', 'data': [ 'Value' ] }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/enum-missing-data.json:6: Key 'data' is missing from enum 'MyEnum'
|
||||
tests/qapi-schema/enum-missing-data.json:2: Key 'data' is missing from enum 'MyEnum'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we require that all QAPI enums have a data array
|
||||
|
||||
##
|
||||
# @MyEnum:
|
||||
##
|
||||
{ 'enum': 'MyEnum' }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/enum-wrong-data.json:6: Enum 'MyEnum' requires an array for 'data'
|
||||
tests/qapi-schema/enum-wrong-data.json:2: Enum 'MyEnum' requires an array for 'data'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# we require that all qapi enums have an array for data
|
||||
|
||||
##
|
||||
# @MyEnum:
|
||||
##
|
||||
{ 'enum': 'MyEnum', 'data': { 'value': 'str' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/event-boxed-empty.json:6: Use of 'boxed' requires 'data'
|
||||
tests/qapi-schema/event-boxed-empty.json:2: Use of 'boxed' requires 'data'
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
# 'boxed' requires a non-empty type
|
||||
|
||||
##
|
||||
# @FOO:
|
||||
##
|
||||
{ 'event': 'FOO', 'boxed': true }
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
# TODO: might be nice to enforce naming conventions; but until then this works
|
||||
# even though events should usually be ALL_CAPS
|
||||
|
||||
##
|
||||
# @oops:
|
||||
##
|
||||
{ 'event': 'oops' }
|
||||
|
|
|
@ -3,4 +3,3 @@ enum QType ['none', 'qnull', 'qint', 'qstring', 'qdict', 'qlist', 'qfloat', 'qbo
|
|||
event oops None
|
||||
boxed=False
|
||||
object q_empty
|
||||
doc symbol=oops expr=('event', 'oops')
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/event-nest-struct.json:5: Member 'a' of 'data' for event 'EVENT_A' should be a type name
|
||||
tests/qapi-schema/event-nest-struct.json:1: Member 'a' of 'data' for event 'EVENT_A' should be a type name
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
##
|
||||
# @EVENT_A:
|
||||
# event-nest-struct
|
||||
##
|
||||
{ 'event': 'EVENT_A',
|
||||
'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/flat-union-array-branch.json:20: Member 'value1' of union 'TestUnion' cannot be an array
|
||||
tests/qapi-schema/flat-union-array-branch.json:8: Member 'value1' of union 'TestUnion' cannot be an array
|
||||
|
|
|
@ -1,22 +1,10 @@
|
|||
##
|
||||
# @TestEnum:
|
||||
##
|
||||
# we require flat union branches to be a struct
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
##
|
||||
# @Base:
|
||||
##
|
||||
{ 'struct': 'Base',
|
||||
'data': { 'enum1': 'TestEnum' } }
|
||||
##
|
||||
# @TestTypeB:
|
||||
##
|
||||
{ 'struct': 'TestTypeB',
|
||||
'data': { 'integer': 'int' } }
|
||||
##
|
||||
# @TestUnion:
|
||||
##
|
||||
{ 'union': 'TestUnion',
|
||||
'base': 'Base',
|
||||
'discriminator': 'enum1',
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/flat-union-bad-base.json:21: 'string' (member of TestTypeA) collides with 'string' (base of TestUnion)
|
||||
tests/qapi-schema/flat-union-bad-base.json:8: 'string' (member of TestTypeA) collides with 'string' (base of TestUnion)
|
||||
|
|
|
@ -1,23 +1,10 @@
|
|||
# we allow anonymous base, but enforce no duplicate keys
|
||||
|
||||
##
|
||||
# @TestEnum:
|
||||
##
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
##
|
||||
# @TestTypeA:
|
||||
##
|
||||
{ 'struct': 'TestTypeA',
|
||||
'data': { 'string': 'str' } }
|
||||
##
|
||||
# @TestTypeB:
|
||||
##
|
||||
{ 'struct': 'TestTypeB',
|
||||
'data': { 'integer': 'int' } }
|
||||
##
|
||||
# @TestUnion:
|
||||
##
|
||||
{ 'union': 'TestUnion',
|
||||
'base': { 'enum1': 'TestEnum', 'string': 'str' },
|
||||
'discriminator': 'enum1',
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/flat-union-bad-discriminator.json:27: Discriminator of flat union 'TestUnion' requires a string name
|
||||
tests/qapi-schema/flat-union-bad-discriminator.json:11: Discriminator of flat union 'TestUnion' requires a string name
|
||||
|
|
|
@ -1,29 +1,13 @@
|
|||
# we require the discriminator to be a string naming a base-type member
|
||||
# this tests the old syntax for anonymous unions before we added alternates
|
||||
|
||||
##
|
||||
# @TestEnum:
|
||||
##
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
##
|
||||
# @TestBase:
|
||||
##
|
||||
{ 'struct': 'TestBase',
|
||||
'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
|
||||
##
|
||||
# @TestTypeA:
|
||||
##
|
||||
{ 'struct': 'TestTypeA',
|
||||
'data': { 'string': 'str' } }
|
||||
##
|
||||
# @TestTypeB:
|
||||
##
|
||||
{ 'struct': 'TestTypeB',
|
||||
'data': { 'integer': 'int' } }
|
||||
##
|
||||
# @TestUnion:
|
||||
##
|
||||
{ 'union': 'TestUnion',
|
||||
'base': 'TestBase',
|
||||
'discriminator': {},
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/flat-union-base-any.json:21: 'base' for union 'TestUnion' cannot use built-in type 'any'
|
||||
tests/qapi-schema/flat-union-base-any.json:8: 'base' for union 'TestUnion' cannot use built-in type 'any'
|
||||
|
|
|
@ -1,23 +1,10 @@
|
|||
# we require the base to be an existing struct
|
||||
|
||||
##
|
||||
# @TestEnum:
|
||||
##
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
##
|
||||
# @TestTypeA:
|
||||
##
|
||||
{ 'struct': 'TestTypeA',
|
||||
'data': { 'string': 'str' } }
|
||||
##
|
||||
# @TestTypeB:
|
||||
##
|
||||
{ 'struct': 'TestTypeB',
|
||||
'data': { 'integer': 'int' } }
|
||||
##
|
||||
# @TestUnion:
|
||||
##
|
||||
{ 'union': 'TestUnion',
|
||||
'base': 'any',
|
||||
'discriminator': 'enum1',
|
||||
|
|
|
@ -1 +1 @@
|
|||
tests/qapi-schema/flat-union-base-union.json:30: 'base' for union 'TestUnion' cannot use union type 'UnionBase'
|
||||
tests/qapi-schema/flat-union-base-union.json:14: 'base' for union 'TestUnion' cannot use union type 'UnionBase'
|
||||
|
|
|
@ -2,31 +2,15 @@
|
|||
# TODO: It would be possible to allow a union as a base, as long as all
|
||||
# permutations of QMP names exposed by base do not clash with any QMP
|
||||
# member names added by local variants.
|
||||
|
||||
##
|
||||
# @TestEnum:
|
||||
##
|
||||
{ 'enum': 'TestEnum',
|
||||
'data': [ 'value1', 'value2' ] }
|
||||
##
|
||||
# @TestTypeA:
|
||||
##
|
||||
{ 'struct': 'TestTypeA',
|
||||
'data': { 'string': 'str' } }
|
||||
##
|
||||
# @TestTypeB:
|
||||
##
|
||||
{ 'struct': 'TestTypeB',
|
||||
'data': { 'integer': 'int' } }
|
||||
##
|
||||
# @UnionBase:
|
||||
##
|
||||
{ 'union': 'UnionBase',
|
||||
'data': { 'kind1': 'TestTypeA',
|
||||
'kind2': 'TestTypeB' } }
|
||||
##
|
||||
# @TestUnion:
|
||||
##
|
||||
{ 'union': 'TestUnion',
|
||||
'base': 'UnionBase',
|
||||
'discriminator': 'type',
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue