tests/qapi-schema: Cover feature documentation comments
Commit 8aa3a33e44 "tests/qapi-schema: Test for good feature lists in structs" neglected to cover documentation comments, and the previous commit followed its example. Make up for them. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191018081454.21369-5-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
2e2e0df270
commit
79598c8a63
@ -71,8 +71,12 @@
|
|||||||
# A paragraph
|
# A paragraph
|
||||||
#
|
#
|
||||||
# Another paragraph (but no @var: line)
|
# Another paragraph (but no @var: line)
|
||||||
|
#
|
||||||
|
# Features:
|
||||||
|
# @variant1-feat: a feature
|
||||||
##
|
##
|
||||||
{ 'struct': 'Variant1',
|
{ 'struct': 'Variant1',
|
||||||
|
'features': [ 'variant1-feat' ],
|
||||||
'data': { 'var1': { 'type': 'str', 'if': 'defined(IFSTR)' } } }
|
'data': { 'var1': { 'type': 'str', 'if': 'defined(IFSTR)' } } }
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -104,6 +108,10 @@
|
|||||||
#
|
#
|
||||||
# @arg2: the second
|
# @arg2: the second
|
||||||
# argument
|
# argument
|
||||||
|
#
|
||||||
|
# Features:
|
||||||
|
# @cmd-feat1: a feature
|
||||||
|
# @cmd-feat2: another feature
|
||||||
# Note: @arg3 is undocumented
|
# Note: @arg3 is undocumented
|
||||||
# Returns: @Object
|
# Returns: @Object
|
||||||
# TODO: frobnicate
|
# TODO: frobnicate
|
||||||
@ -123,11 +131,15 @@
|
|||||||
##
|
##
|
||||||
{ 'command': 'cmd',
|
{ 'command': 'cmd',
|
||||||
'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
|
'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
|
||||||
'returns': 'Object' }
|
'returns': 'Object',
|
||||||
|
'features': [ 'cmd-feat1', 'cmd-feat2' ] }
|
||||||
|
|
||||||
##
|
##
|
||||||
# @cmd-boxed:
|
# @cmd-boxed:
|
||||||
# If you're bored enough to read this, go see a video of boxed cats
|
# If you're bored enough to read this, go see a video of boxed cats
|
||||||
|
# Features:
|
||||||
|
# @cmd-feat1: a feature
|
||||||
|
# @cmd-feat2: another feature
|
||||||
# Example:
|
# Example:
|
||||||
#
|
#
|
||||||
# -> in
|
# -> in
|
||||||
@ -135,4 +147,5 @@
|
|||||||
# <- out
|
# <- out
|
||||||
##
|
##
|
||||||
{ 'command': 'cmd-boxed', 'boxed': true,
|
{ 'command': 'cmd-boxed', 'boxed': true,
|
||||||
'data': 'Object' }
|
'data': 'Object',
|
||||||
|
'features': [ 'cmd-feat1', 'cmd-feat2' ] }
|
||||||
|
@ -20,6 +20,7 @@ object Base
|
|||||||
object Variant1
|
object Variant1
|
||||||
member var1: str optional=False
|
member var1: str optional=False
|
||||||
if ['defined(IFSTR)']
|
if ['defined(IFSTR)']
|
||||||
|
feature variant1-feat
|
||||||
object Variant2
|
object Variant2
|
||||||
object Object
|
object Object
|
||||||
base Base
|
base Base
|
||||||
@ -47,8 +48,12 @@ object q_obj_cmd-arg
|
|||||||
member arg3: bool optional=False
|
member arg3: bool optional=False
|
||||||
command cmd q_obj_cmd-arg -> Object
|
command cmd q_obj_cmd-arg -> Object
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
|
feature cmd-feat1
|
||||||
|
feature cmd-feat2
|
||||||
command cmd-boxed Object -> None
|
command cmd-boxed Object -> None
|
||||||
gen=True success_response=True boxed=True oob=False preconfig=False
|
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||||
|
feature cmd-feat1
|
||||||
|
feature cmd-feat2
|
||||||
doc freeform
|
doc freeform
|
||||||
body=
|
body=
|
||||||
= Section
|
= Section
|
||||||
|
@ -122,6 +122,12 @@ Not documented
|
|||||||
@*@b{If:} @code{defined(IFSTR)}
|
@*@b{If:} @code{defined(IFSTR)}
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@b{Features:}
|
||||||
|
@table @asis
|
||||||
|
@item @code{variant1-feat}
|
||||||
|
a feature
|
||||||
|
@end table
|
||||||
|
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
|
|
||||||
@ -182,6 +188,14 @@ argument
|
|||||||
Not documented
|
Not documented
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@b{Features:}
|
||||||
|
@table @asis
|
||||||
|
@item @code{cmd-feat1}
|
||||||
|
a feature
|
||||||
|
@item @code{cmd-feat2}
|
||||||
|
another feature
|
||||||
|
@end table
|
||||||
|
|
||||||
@b{Note:}
|
@b{Note:}
|
||||||
@code{arg3} is undocumented
|
@code{arg3} is undocumented
|
||||||
|
|
||||||
@ -227,6 +241,14 @@ If you're bored enough to read this, go see a video of boxed cats
|
|||||||
|
|
||||||
@b{Arguments:} the members of @code{Object}
|
@b{Arguments:} the members of @code{Object}
|
||||||
|
|
||||||
|
@b{Features:}
|
||||||
|
@table @asis
|
||||||
|
@item @code{cmd-feat1}
|
||||||
|
a feature
|
||||||
|
@item @code{cmd-feat2}
|
||||||
|
another feature
|
||||||
|
@end table
|
||||||
|
|
||||||
@b{Example:}
|
@b{Example:}
|
||||||
@example
|
@example
|
||||||
-> in
|
-> in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user