diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-09-14 17:34:52 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-09-24 14:07:23 +0200 |
commit | ef91ab0d5fe1a263e9e3cc1d14ea702a0a9f2261 (patch) | |
tree | 4ead6eb3f797a8cb6ed1a642df7c5aa716b705d4 /tests/qapi-schema/union-branch-if-invalid.json | |
parent | 31248b985e30801c2676ff448291c2b3d02a1b8c (diff) |
tests/qapi-schema: Demonstrate insufficient 'if' checking
Cover invalid 'if' in struct members, features, union and alternate
branches. Four out of four are broken. Mark FIXME.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190914153506.2151-6-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Comment typo fixed]
Diffstat (limited to 'tests/qapi-schema/union-branch-if-invalid.json')
-rw-r--r-- | tests/qapi-schema/union-branch-if-invalid.json | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/qapi-schema/union-branch-if-invalid.json b/tests/qapi-schema/union-branch-if-invalid.json new file mode 100644 index 0000000000..859b63b610 --- /dev/null +++ b/tests/qapi-schema/union-branch-if-invalid.json @@ -0,0 +1,7 @@ +# Cover branch with invalid 'if' +# FIXME not rejected, would generate '#if \n' +{ 'enum': 'Branches', 'data': ['branch1'] } +{ 'struct': 'Stru', 'data': { 'member': 'str' } } +{ 'union': 'Uni', + 'base': { 'tag': 'Branches' }, 'discriminator': 'tag', + 'data': { 'branch1': { 'type': 'Stru', 'if': [''] } } } |