aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-03-01 16:40:46 +0100
committerMarkus Armbruster <armbru@redhat.com>2019-03-05 14:43:11 +0100
commit0f20628b24ecc1e085ec536a43ea9f6cc1605ad2 (patch)
tree96067866f693547bfe67321722d378504f326ce9 /tests
parentca0ac758d6fad30676ded90d3975f282d57a4435 (diff)
tests/qapi-schema: Cover conditional arrays
Commit 967c885108f neglected to cover arrays of conditional types. Do that now. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190301154051.23317-3-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qapi-schema/qapi-schema-test.json2
-rw-r--r--tests/qapi-schema/qapi-schema-test.out4
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
index cb0857df52..70612f394e 100644
--- a/tests/qapi-schema/qapi-schema-test.json
+++ b/tests/qapi-schema/qapi-schema-test.json
@@ -236,5 +236,5 @@
{ 'event': 'TestIfEvent', 'data':
{ 'foo': 'TestIfStruct',
- 'bar': { 'type': 'TestIfEnum', 'if': 'defined(TEST_IF_EVT_BAR)' } },
+ 'bar': { 'type': ['TestIfEnum'], 'if': 'defined(TEST_IF_EVT_BAR)' } },
'if': 'defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)' }
diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out
index b59f4ca5a4..97f671ca5f 100644
--- a/tests/qapi-schema/qapi-schema-test.out
+++ b/tests/qapi-schema/qapi-schema-test.out
@@ -325,9 +325,11 @@ command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree
if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
command TestCmdReturnDefThree None -> UserDefThree
gen=True success_response=True boxed=False oob=False preconfig=False
+array TestIfEnumList TestIfEnum
+ if ['defined(TEST_IF_ENUM)']
object q_obj_TestIfEvent-arg
member foo: TestIfStruct optional=False
- member bar: TestIfEnum optional=False
+ member bar: TestIfEnumList optional=False
if ['defined(TEST_IF_EVT_BAR)']
if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
event TestIfEvent q_obj_TestIfEvent-arg