mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 14:31:52 -06:00
tests/qapi-schema/doc-good: Improve argument description tests
Improve the comments to better describe what they test. Cover argument description starting on a new line indented. This style isn't documented in docs/devel/qapi-code-gen.rst. qapi-gen.py accepts it, but messes up indentation: it's stripped from the first line, not subsequent ones. The next commit will fix this. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230428105429.1687850-11-armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
5962635561
commit
a87a9b4d4f
2 changed files with 18 additions and 13 deletions
|
@ -54,7 +54,7 @@
|
||||||
##
|
##
|
||||||
# @Enum:
|
# @Enum:
|
||||||
#
|
#
|
||||||
# @one: The _one_ {and only}
|
# @one: The _one_ {and only}, description on the same line
|
||||||
#
|
#
|
||||||
# Features:
|
# Features:
|
||||||
# @enum-feat: Also _one_ {and only}
|
# @enum-feat: Also _one_ {and only}
|
||||||
|
@ -73,7 +73,8 @@
|
||||||
# @Base:
|
# @Base:
|
||||||
#
|
#
|
||||||
# @base1:
|
# @base1:
|
||||||
# the first member
|
# description starts on a new line,
|
||||||
|
# not indented
|
||||||
##
|
##
|
||||||
{ 'struct': 'Base', 'data': { 'base1': 'Enum' },
|
{ 'struct': 'Base', 'data': { 'base1': 'Enum' },
|
||||||
'if': { 'all': ['IFALL1', 'IFALL2'] } }
|
'if': { 'all': ['IFALL1', 'IFALL2'] } }
|
||||||
|
@ -120,7 +121,8 @@
|
||||||
##
|
##
|
||||||
# @Alternate:
|
# @Alternate:
|
||||||
#
|
#
|
||||||
# @i: an integer
|
# @i: description starts on the same line
|
||||||
|
# remainder indented the same
|
||||||
# @b is undocumented
|
# @b is undocumented
|
||||||
#
|
#
|
||||||
# Features:
|
# Features:
|
||||||
|
@ -138,10 +140,11 @@
|
||||||
##
|
##
|
||||||
# @cmd:
|
# @cmd:
|
||||||
#
|
#
|
||||||
# @arg1: the first argument
|
# @arg1:
|
||||||
|
# description starts on a new line,
|
||||||
|
# indented
|
||||||
#
|
#
|
||||||
# @arg2: the second
|
# @arg2: the second argument
|
||||||
# argument
|
|
||||||
#
|
#
|
||||||
# Features:
|
# Features:
|
||||||
# @cmd-feat1: a feature
|
# @cmd-feat1: a feature
|
||||||
|
|
|
@ -104,7 +104,7 @@ doc symbol=Enum
|
||||||
body=
|
body=
|
||||||
|
|
||||||
arg=one
|
arg=one
|
||||||
The _one_ {and only}
|
The _one_ {and only}, description on the same line
|
||||||
arg=two
|
arg=two
|
||||||
|
|
||||||
feature=enum-feat
|
feature=enum-feat
|
||||||
|
@ -117,12 +117,13 @@ doc symbol=Base
|
||||||
body=
|
body=
|
||||||
|
|
||||||
arg=base1
|
arg=base1
|
||||||
the first member
|
description starts on a new line,
|
||||||
|
not indented
|
||||||
doc symbol=Variant1
|
doc symbol=Variant1
|
||||||
body=
|
body=
|
||||||
A paragraph
|
A paragraph
|
||||||
|
|
||||||
Another paragraph (but no @var: line)
|
Another paragraph
|
||||||
|
|
||||||
@var1 is undocumented
|
@var1 is undocumented
|
||||||
arg=var1
|
arg=var1
|
||||||
|
@ -143,7 +144,8 @@ doc symbol=Alternate
|
||||||
body=
|
body=
|
||||||
|
|
||||||
arg=i
|
arg=i
|
||||||
an integer
|
description starts on the same line
|
||||||
|
remainder indented the same
|
||||||
@b is undocumented
|
@b is undocumented
|
||||||
arg=b
|
arg=b
|
||||||
|
|
||||||
|
@ -156,10 +158,10 @@ doc symbol=cmd
|
||||||
body=
|
body=
|
||||||
|
|
||||||
arg=arg1
|
arg=arg1
|
||||||
the first argument
|
description starts on a new line,
|
||||||
|
indented
|
||||||
arg=arg2
|
arg=arg2
|
||||||
the second
|
the second argument
|
||||||
argument
|
|
||||||
arg=arg3
|
arg=arg3
|
||||||
|
|
||||||
feature=cmd-feat1
|
feature=cmd-feat1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue