diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-06-26 19:25:14 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-07-24 13:35:11 +0200 |
commit | 4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa (patch) | |
tree | bf7c9f1260f68a8e9d9409fd664225e324414721 /tests/qapi-schema | |
parent | d2f95f4d482374485234790a6fc3cca29ebb7355 (diff) | |
download | qemu-4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa.zip qemu-4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa.tar.gz qemu-4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa.tar.bz2 |
qapi: Introduce a first class 'null' type
I expect the 'null' type to be useful mostly for members of alternate
types.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.json | 3 | ||||
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.out | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json index 91ffb26..c72dbd8 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -93,7 +93,8 @@ { 'struct': 'WrapAlternate', 'data': { 'alt': 'UserDefAlternate' } } { 'alternate': 'UserDefAlternate', - 'data': { 'udfu': 'UserDefFlatUnion', 'e': 'EnumOne', 'i': 'int' } } + 'data': { 'udfu': 'UserDefFlatUnion', 'e': 'EnumOne', 'i': 'int', + 'n': 'null' } } { 'struct': 'UserDefC', 'data': { 'string1': 'str', 'string2': 'str' } } diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out index b88b8aa..3b1e908 100644 --- a/tests/qapi-schema/qapi-schema-test.out +++ b/tests/qapi-schema/qapi-schema-test.out @@ -64,6 +64,7 @@ alternate UserDefAlternate case udfu: UserDefFlatUnion case e: EnumOne case i: int + case n: null object UserDefB member intb: int optional=False member a-b: bool optional=True |