summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/qapi-schema-test.json
diff options
context:
space:
mode:
authorAnthony Liguori2013-08-22 16:29:25 +0200
committerAnthony Liguori2013-08-22 16:29:25 +0200
commit5211333bf77d5199d5f27cd306b2798d90a4c8fc (patch)
treeb348e71e5874fc649f33420c52d0e9e60d4ca962 /tests/qapi-schema/qapi-schema-test.json
parentMerge remote-tracking branch 'jliu/or32' into staging (diff)
parentscripts/qapi.py: Avoid syntax not supported by Python 2.4 (diff)
downloadqemu-5211333bf77d5199d5f27cd306b2798d90a4c8fc.tar.gz
qemu-5211333bf77d5199d5f27cd306b2798d90a4c8fc.tar.xz
qemu-5211333bf77d5199d5f27cd306b2798d90a4c8fc.zip
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Laszlo Ersek (8) and others # Via Luiz Capitulino * luiz/queue/qmp: scripts/qapi.py: Avoid syntax not supported by Python 2.4 monitor: print the invalid char in error message OptsVisitor: introduce unit tests, with test cases for range flattening add "test-int128" and "test-bitops" to .gitignore OptsVisitor: don't try to flatten overlong integer ranges OptsVisitor: opts_type_uint64(): recognize intervals when LM_IN_PROGRESS OptsVisitor: rebase opts_type_uint64() to parse_uint_full() OptsVisitor: opts_type_int(): recognize intervals when LM_IN_PROGRESS OptsVisitor: introduce list modes for interval flattening OptsVisitor: introduce basic list modes Convert stderr message calling error_get_pretty() to error_report() Message-id: 1377015041-6567-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Diffstat (limited to 'tests/qapi-schema/qapi-schema-test.json')
-rw-r--r--tests/qapi-schema/qapi-schema-test.json15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
index 4434fa3961..fe5af756c5 100644
--- a/tests/qapi-schema/qapi-schema-test.json
+++ b/tests/qapi-schema/qapi-schema-test.json
@@ -51,3 +51,18 @@
{ 'command': 'user_def_cmd', 'data': {} }
{ 'command': 'user_def_cmd1', 'data': {'ud1a': 'UserDefOne'} }
{ 'command': 'user_def_cmd2', 'data': {'ud1a': 'UserDefOne', 'ud1b': 'UserDefOne'}, 'returns': 'UserDefTwo' }
+
+# For testing integer range flattening in opts-visitor. The following schema
+# corresponds to the option format:
+#
+# -userdef i64=3-6,i64=-5--1,u64=2,u16=1,u16=7-12
+#
+# For simplicity, this example doesn't use [type=]discriminator nor optargs
+# specific to discriminator values.
+{ 'type': 'UserDefOptions',
+ 'data': {
+ '*i64' : [ 'int' ],
+ '*u64' : [ 'uint64' ],
+ '*u16' : [ 'uint16' ],
+ '*i64x': 'int' ,
+ '*u64x': 'uint64' } }