diff options
author | Eric Blake <eblake@redhat.com> | 2016-02-17 23:48:18 -0700 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-02-19 11:08:57 +0100 |
commit | 68d078395d8233ca8455a95f05e5c23e367777c2 (patch) | |
tree | f1e769c6df0b7d5e1d93828a634ae31db5276c2e /tests/qapi-schema/qapi-schema-test.out | |
parent | 46534309e667fd860720f983c2c9aefe0354340d (diff) |
qapi: Add tests of complex objects within alternate
Upcoming patches will adjust how we visit an object branch of an
alternate; but we were completely lacking testsuite coverage.
Rectify this, so that the future patches will be able to highlight
the changes and still prove that we avoided regressions.
In particular, the use of a flat union UserDefFlatUnion rather
than a simple struct UserDefA as the branch will give us coverage
of an object with variants. And visiting an alternate as both
the top level and as a nested member gives confidence in correct
memory allocation handling, especially if the test is run under
valgrind.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1455778109-6278-5-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/qapi-schema-test.out')
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.out | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out index 241aadbca0..f5e2a73c30 100644 --- a/tests/qapi-schema/qapi-schema-test.out +++ b/tests/qapi-schema/qapi-schema-test.out @@ -105,7 +105,7 @@ object UserDefA member boolean: bool optional=False member a_b: int optional=True alternate UserDefAlternate - case uda: UserDefA + case udfu: UserDefFlatUnion case s: str case i: int object UserDefB @@ -172,6 +172,8 @@ object UserDefUnionBase2 member enum1: QEnumTwo optional=False object UserDefZero member integer: int optional=False +object WrapAlternate + member alt: UserDefAlternate optional=False event __ORG.QEMU_X-EVENT __org.qemu_x-Struct alternate __org.qemu_x-Alt case __org.qemu_x-branch: str |