diff options
author | Markus Armbruster | 2019-09-14 17:34:58 +0200 |
---|---|---|
committer | Markus Armbruster | 2019-09-24 14:07:23 +0200 |
commit | c2c7065e1752a3be1b437d1ea359cde35d28ee3b (patch) | |
tree | 309fd28ba39f32c26ebaaf9ca0b06852a5c67f2d /tests/qapi-schema | |
parent | qapi: Fix broken discriminator error messages (diff) | |
download | qemu-c2c7065e1752a3be1b437d1ea359cde35d28ee3b.tar.gz qemu-c2c7065e1752a3be1b437d1ea359cde35d28ee3b.tar.xz qemu-c2c7065e1752a3be1b437d1ea359cde35d28ee3b.zip |
qapi: Reject blank 'if' conditions in addition to empty ones
"'if': 'COND'" generates "#if COND". We reject empty COND because it
won't compile. Blank COND won't compile any better, so reject that,
too.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190914153506.2151-12-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r-- | tests/qapi-schema/bad-if-list.err | 2 | ||||
-rw-r--r-- | tests/qapi-schema/bad-if-list.json | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/qapi-schema/bad-if-list.err b/tests/qapi-schema/bad-if-list.err index 0af6316f78..53af099083 100644 --- a/tests/qapi-schema/bad-if-list.err +++ b/tests/qapi-schema/bad-if-list.err @@ -1 +1 @@ -tests/qapi-schema/bad-if-list.json:2: 'if' condition '' makes no sense +tests/qapi-schema/bad-if-list.json:2: 'if' condition ' ' makes no sense diff --git a/tests/qapi-schema/bad-if-list.json b/tests/qapi-schema/bad-if-list.json index 49ced9b9ca..ea3d95bb6b 100644 --- a/tests/qapi-schema/bad-if-list.json +++ b/tests/qapi-schema/bad-if-list.json @@ -1,3 +1,3 @@ # check invalid 'if' content { 'struct': 'TestIfStruct', 'data': { 'foo': 'int' }, - 'if': ['foo', ''] } + 'if': ['foo', ' '] } |