aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/qapi-schema-test.json
diff options
context:
space:
mode:
authorPeter Krempa <pkrempa@redhat.com>2019-10-18 10:14:52 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-10-22 13:54:13 +0200
commit2e2e0df2706886488caf3d0dd22d4fe3acc4d4e0 (patch)
treea9ca91d7b9b91558b3607460ca61b7eb491b0e23 /tests/qapi-schema/qapi-schema-test.json
parent23394b4c393c832aa3891533587ff97e04c70883 (diff)
tests: qapi: Test 'features' of commands
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191018081454.21369-4-armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/qapi-schema-test.json')
-rw-r--r--tests/qapi-schema/qapi-schema-test.json18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
index 75c42eb0e3..9abf175fe0 100644
--- a/tests/qapi-schema/qapi-schema-test.json
+++ b/tests/qapi-schema/qapi-schema-test.json
@@ -290,3 +290,21 @@
'cfs1': 'CondFeatureStruct1',
'cfs2': 'CondFeatureStruct2',
'cfs3': 'CondFeatureStruct3' } }
+
+# test 'features' for command
+
+{ 'command': 'test-command-features0',
+ 'features': [] }
+{ 'command': 'test-command-features1',
+ 'features': [ 'feature1' ] }
+{ 'command': 'test-command-features3',
+ 'features': [ 'feature1', 'feature2' ] }
+
+{ 'command': 'test-command-cond-features1',
+ 'features': [ { 'name': 'feature1', 'if': 'defined(TEST_IF_FEATURE_1)'} ] }
+{ 'command': 'test-command-cond-features2',
+ 'features': [ { 'name': 'feature1', 'if': 'defined(TEST_IF_FEATURE_1)'},
+ { 'name': 'feature2', 'if': 'defined(TEST_IF_FEATURE_2)'} ] }
+{ 'command': 'test-command-cond-features3',
+ 'features': [ { 'name': 'feature1', 'if': [ 'defined(TEST_IF_COND_1)',
+ 'defined(TEST_IF_COND_2)'] } ] }