From 28770e057f265a4e70bcbdfc2447cce7b5f2dc19 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 16 Sep 2015 13:06:24 +0200 Subject: qapi: Introduce a first class 'any' type It's first class, because unlike '**', it actually works, i.e. doesn't require 'gen': false. '**' will go away next. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- tests/qapi-schema/flat-union-base-any.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/qapi-schema/flat-union-base-any.json (limited to 'tests/qapi-schema/flat-union-base-any.json') diff --git a/tests/qapi-schema/flat-union-base-any.json b/tests/qapi-schema/flat-union-base-any.json new file mode 100644 index 0000000000..fe66b713ef --- /dev/null +++ b/tests/qapi-schema/flat-union-base-any.json @@ -0,0 +1,12 @@ +# we require the base to be an existing struct +{ 'enum': 'TestEnum', + 'data': [ 'value1', 'value2' ] } +{ 'struct': 'TestTypeA', + 'data': { 'string': 'str' } } +{ 'struct': 'TestTypeB', + 'data': { 'integer': 'int' } } +{ 'union': 'TestUnion', + 'base': 'any', + 'discriminator': 'enum1', + 'data': { 'value1': 'TestTypeA', + 'value2': 'TestTypeB' } } -- cgit v1.2.3-55-g7522