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 <armbru@redhat.com> Message-Id: <20210908045428.2689093-5-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
e2ff14a574
commit
71f03ef9f6
2
tests/qapi-schema/bad-if-not.err
Normal file
2
tests/qapi-schema/bad-if-not.err
Normal file
@ -0,0 +1,2 @@
|
||||
bad-if-not.json: In struct 'TestIfStruct':
|
||||
bad-if-not.json:2: 'if' condition [] of struct is useless
|
3
tests/qapi-schema/bad-if-not.json
Normal file
3
tests/qapi-schema/bad-if-not.json
Normal file
@ -0,0 +1,3 @@
|
||||
# check 'if not' with empy argument
|
||||
{ 'struct': 'TestIfStruct', 'data': { 'foo': 'int' },
|
||||
'if': { 'not': '' } }
|
0
tests/qapi-schema/bad-if-not.out
Normal file
0
tests/qapi-schema/bad-if-not.out
Normal file
@ -43,6 +43,7 @@ schemas = [
|
||||
'bad-if-key.json',
|
||||
'bad-if-keys.json',
|
||||
'bad-if-list.json',
|
||||
'bad-if-not.json',
|
||||
'bad-type-bool.json',
|
||||
'bad-type-dict.json',
|
||||
'bad-type-int.json',
|
||||
|
Loading…
Reference in New Issue
Block a user