4 # Positive QAPI doc comment tests
6 { 'pragma': { 'doc-required': true } }
13 # *strong* _with emphasis_
36 # Since: the first age
39 # 1. Lorem ipsum dolor sit amet
41 # 2. Ut enim ad minim veniam
43 # Duis aute irure dolor
56 # @one: The _one_ {and only}
59 # @enum-feat: Also _one_ {and only}
61 # @two is undocumented
63 { 'enum': 'Enum', 'data':
64 [ { 'name': 'one', 'if': 'defined(IFONE)' }, 'two' ],
65 'features': [ 'enum-feat' ],
66 'if': 'defined(IFCOND)' }
73 { 'struct': 'Base', 'data': { 'base1': 'Enum' } }
79 # Another paragraph (but no @var: line)
82 # @variant1-feat: a feature
83 # @member-feat: a member feature
85 { 'struct': 'Variant1',
86 'features': [ 'variant1-feat' ],
87 'data': { 'var1': { 'type': 'str',
88 'features': [ 'member-feat' ],
89 'if': 'defined(IFSTR)' } } }
94 { 'struct': 'Variant2', 'data': {} }
99 # @union-feat1: a feature
102 'features': [ 'union-feat1' ],
104 'discriminator': 'base1',
105 'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
110 # @union-feat2: a feature
112 { 'union': 'SugaredUnion',
113 'features': [ 'union-feat2' ],
114 'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
122 # @alt-feat: a feature
124 { 'alternate': 'Alternate',
125 'features': [ 'alt-feat' ],
126 'data': { 'i': 'int', 'b': 'bool' } }
129 # == Another subsection
134 # @arg1: the first argument
140 # @cmd-feat1: a feature
141 # @cmd-feat2: another feature
142 # Note: @arg3 is undocumented
146 # - Lorem ipsum dolor sit amet
147 # - Ut enim ad minim veniam
149 # Duis aute irure dolor
160 'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
162 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
166 # If you're bored enough to read this, go see a video of boxed cats
168 # @cmd-feat1: a feature
169 # @cmd-feat2: another feature
176 { 'command': 'cmd-boxed', 'boxed': true,
178 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
185 { 'event': 'EVT-BOXED', 'boxed': true,
186 'features': [ 'feat3' ],