Skip to content

Commit 71f03ef

Browse files
author
Markus Armbruster
committed
tests/qapi-schema: Cover 'not' condition with empty argument
We flag this, but the error message is bogus: bad-if-not.json:2: 'if' condition [] of struct is useless The next commit will fix it. Signed-off-by: Markus Armbruster <[email protected]> Message-Id: <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]>
1 parent e2ff14a commit 71f03ef

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

tests/qapi-schema/bad-if-not.err

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bad-if-not.json: In struct 'TestIfStruct':
2+
bad-if-not.json:2: 'if' condition [] of struct is useless

tests/qapi-schema/bad-if-not.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# check 'if not' with empy argument
2+
{ 'struct': 'TestIfStruct', 'data': { 'foo': 'int' },
3+
'if': { 'not': '' } }

tests/qapi-schema/bad-if-not.out

Whitespace-only changes.

tests/qapi-schema/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ schemas = [
4343
'bad-if-key.json',
4444
'bad-if-keys.json',
4545
'bad-if-list.json',
46+
'bad-if-not.json',
4647
'bad-type-bool.json',
4748
'bad-type-dict.json',
4849
'bad-type-int.json',

0 commit comments

Comments
 (0)